Previous Topic: USER: Initialize Subfile Record (New Record)

Next Topic: CALC: Subfile Control Function Fields

USER: Initialize Subfile Record (Existing Record)

This user point is executed if records exist (PGM.*Program mode = *CHANGE).

Insert logic to perform further record selection processing. Set the program context field record selected to no (PGM.*Record selected = *NO) for records that do not meet the criteria. This procedural level processing is useful when the majority of the records are to be selected but you do not want to build or cannot build the select/omit criteria into the access path.

Note: An action to insert a QUIT function in this user point may produce unpredictable results.

Check for hidden fields in the subfile control as well as the operators on the subfile fields (particularly CT [contains] for alphanumeric fields) to ensure that proper records display.

Function fields of type CNT, MAX, MIN, and SUM are not allowed for this function type; however, you may want to keep running totals of subfile fields. To do this, you can add a function field to the subfile control of type USR and calculate it at subfile load time. This function type only loads a single page at a time; therefore, any calculations should be performed at the single record level or by using the cumulative totals of the subfile record.