Function Updated() Foundation

Determines whether data was changed with a Get object.

Updated() --> lUpdated

The return value of Updated() is .T. (true) when, during data input (via the READ command or the function ReadModal()), the data of a single Get object in the Get list was changed. Otherwise, the return value is .F. (false).


Updated() determines whether or not a user has changed any data during data input, which occurs during the READ command or in the function ReadModal(). Upon beginning the read, the "changed" status (the UPDATED flag) is set to .F. (false). As soon as a user changes data in a single one of the displayed input fields (Get objects), the UPDATED flag is set to the .T. (true). This value remains set until the next READ command or to the next call of ReadModal() and is returned by the function Updated().

The UPDATED flag is set to .T. (true) only after a keyboard entry. When the data of a Get object is changed in any other way, the change is not registered. However, the UPDATED flag can be set directly by the function ReadUpdated().

Using Updated() to determine whether to save data
// In this example, the name of a customer is assigned 
// to a variable that can be edited. If the data of the variable is 
// changed, it is written into the file. 

LOCAL cName 

   USE Customer NEW 

   cName := Customer->Name 
   @  5, 10 GET cName 

   IF Updated() 
      REPLACE Customer->Name WITH cName 


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.