RecordChanged
Mon 01 January 2018Syntax
The syntax of the RecordChanged function varies, depending on whether you use a scroll path reference or a contextual reference to designate the row being tested.
Using a scroll path reference, the syntax is:
RecordChanged(scrollpath, target_row)
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.
Using a contextual reference the syntax is:
RecordChanged(RECORD.target_recname)
A contextual reference specifies the current row on the scroll level designated by RECORD. target_recname.
An older construction, in which a record field expression is passed, is also supported. The record field is any field in the row where the PeopleCode program is executing (typically the one on which the program is executing).
RecordChanged(recordname.fieldname)
Description
Use the RecordChanged function to determine whether the data in a specific row has been modified since it was retrieved from the database either by the user or by a PeopleCode program.
Note: This function remains for backward compatibility only. Use the IsChanged record class property instead.
This is useful during save processing for making updates conditional on whether rows have changed.
Note: The word "record" is used in this function name in a misleading way. Remember that this function (like the related functions RecordDeleted and RecordNew) checks the state of a row, not a record.
Parameters
Field or Control |
Definition |
---|---|
scrollpath |
A construction that specifies a scroll level in the component buffer. |
RECORD .target_recname |
The primary scroll record of the scroll level where the row being referenced is located. As an alternative, you can use SCROLL. scrollname. |
Returns
Returns a Boolean value:
-
True if any data in the target row has been changed.
-
False if no data in the target row has been changed.