Modified record
Modified record {( aTable )} -> Function result
Parameter | Type | Description | |
---|---|---|---|
aTable | Table | → | Table to test if current record has been modified, or Default table, if omitted |
Function result | Boolean | ← | Record has been modified (True), or Record has not been modified (False) |
Description
Modified record returns True if the current record of aTable has been modified but not saved; otherwise it returns False. This function allows the designer to quickly test whether or not the record needs to be saved. It is especially valuable in input forms to check whether or not to save the current record before proceeding to the next one. This function always returns True for a new record.
Note that this function always returns True in the following contexts:
- the current record is a new record,
- after the execution of the PUSH RECORD and POP RECORD commands,
- as soon as a value has been assigned to a field of the record, even if it is the same value as the former one. For example, Modified record returns True after the following statement is executed:
[Table_1]Field_1:=[Table_1]Field_1
Example
The following example shows a typical use for Modified record:
If(Modified record([Customers]))
SAVE RECORD([Customers])
End if