ui.Dialog.setFieldTouched

Sets the modification flag of the specified field.

Syntax

setFieldTouched(
   fields STRING,
   val BOOLEAN )
  1. fields is the string with the list of field specification, see Identifying fields in dialog methods.
  2. val is the boolean value to set the modification flag.

Usage

The setFieldTouched() method can be used to change the modification flag of the specified field(s).

The fields is a string containing the field qualifier, with an optional prefix ("[table.]column"), or a table prefix followed by a dot and an asterisk ("table.*").

You typically use this method to set the touched flag when assigning a variable, to emulate user input. Remember when using the UNBUFFERED mode, you don't need to display the value to the fields. The setFieldTouched() method is provided as a 3GL replacement for the DISPLAY BY NAME / TO instructions to set the modification flags.
ON ACTION zoom_city 
  LET p_cust.cust_city = zoom_city()
  CALL DIALOG.setFieldTouched("customer.cust_city", TRUE)
    ...
If the parameter is a screen record followed by dot-asterisk, the method checks the modification flags of all the fields that belong to the screen record. You typically use this to reset the touched flags of a group of fields, after modifications have been saved to the database, to get back to the initial state of the dialog:
ON ACTION save 
  CALL save_cust_record()
  CALL DIALOG.setFieldTouched("customer.*", FALSE)
    ...

The modification flags are reset to false when using an INPUT ARRAY list, every time you leave the modified row.