Trail: PROIV Documentation > Developer > PROIV Developer > Developing Functions > Screen Dynamic Object Process Points

The event process points for dynamic objects in a Screen Function are, On Focus, On Window, Standard Validation, Custom Validation, On Refresh and Lost Focus.  

On Focus - This logic is executed before the dynamic object is accessed for input or display.   It is typically used to perform data manipulation and to skip fields.

Where cursor keys or mouse input is used to skip one or more dynamic objects the On Focus logic is NOT processed for the intervening fields. 

On Focus Logic is not processed in Delete or Lookup mode.

On Window - This logic is executed after the WINDOW facility has been initiated in a screen function but before the execution of any logic associated with the window cycle.

Standard Validation - This logic applies to input fields only and is a predefined system check on the input data.  If the data does not conform to the criteria defined in the Standard Validation, the system issues an appropriate error message and prompts for re-input.

You define Standard Validation logic through the use of the Global Logic procedure.  The Global Logic must be type P, which does not return a value to the calling function.  The Global Logic must check $INPUT, !INPUT , or #INPUT and if the input value does not pass the defined check, an error message must be issued through the use of the MSG() statement.  If an error message is issued, the value the user is attempting to enter is not accepted; if no error message is issued, the user's value is accepted.

Custom Validation - Check logic is used to write custom validation code.  If a validation requirement is not met, an error message can be issued and PROIV automatically returns control to the operator so the data can be re-entered.

Check Logic is performed only when data is entered in the specified field.  The input field value is stored in one of three system variables ($INPUT, !INPUT , and #INPUT) until it is validated.  These variables must be used in Custom Validation logic to reference the field value just entered.

Standard Validation and Custom Validation logic are the only places that you can use the following system variables:

$INPUT (alphanumeric fields)
!
INPUT (wide fields)

#INPUT (numeric fields)

You must use these system variables to refer to the input field in logic to make the logic routine completely general.  In this way, you can use the same check logic routine for several different dynamic objects that have the same validation requirements, even though the name of each is different.

On Refresh - This Logic is executed just before the field data appears.

Lost Focus - This logic is executed after other options selected on the field have been processed.  It is typically used to skip fields or to perform data manipulations where the value for the next field is to be computed based on the current or previous fields.

Lost Focus Logic is performed for each field when a screen is initially displayed and after the entry of data (or in the case of a display-only field, when that field is passed over).

Comment on this topic

Topic ID: 520156