FieldChanged
Mon 01 January 2018Syntax
The syntax of the FieldChanged function varies depending on whether you want to use a scroll path reference or a contextual reference to specify the field.
If you want to use a scroll path reference, the syntax is:
FieldChanged(scrollpath, target_row, [recordname.]fieldname)
where scrollpath is:
[RECORD.level1_recname, level1_row, [RECORD.level2_recname, level2_row, ]] RECORD.target_recname
To prevent ambiguous references, you can also use SCROLL . scrollname , where scrollname is the same as the scroll levelâs primary record name.
If you want to use a contextual reference, the syntax is:
FieldChanged([recordname.]fieldname)
In this construction the scroll level and row number are determined based on the current context.
Description
The FieldChanged function returns True if the referenced buffer field has been modified since being retrieved from the database either by a user or by a PeopleCode program.
Note: This function remains for backward compatibility only. Use the IsChanged field class property instead.
This is useful during SavePreChange or SavePostChange processing for checking whether to make related updates based on a change to a field.
Parameters
Field or Control |
Definition |
---|---|
scrollpath |
A construction that specifies a scroll level in the component buffer. |
[ recordname .] fieldname |
The name of the field where the value to check is located. The field can be on scroll level one, two, or three of the active page. The recordname prefix is required if the call to FieldChanged is not on the record definition recordname . |
target_row |
The row number of the target row. If this parameter is omitted, the function assumes the row on which the PeopleCode program is executing. |