KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Old or Modified: Which command should I use?
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: March 7, 2002

Versions: 6.5.x and 6.7.x

To check if the value of a field has been modified, you can use either the Modified command or the command Old. Modified checks if the value of the field has been PROCEDURALLY modified. If it has, the command Modified returns True.

Example:


If (Modified(Field))



  ` The value of the field has been modified.

End if


However, the command Modified does not detect if the value of the field has been modified through manual entry. To find this out, you must compare the new value of the field to its old value. In this case you would use the command Old which returns the old value of the field.


Example:


$old:=Old([Table 1]Field2)

If ($old#Field2)



  ` The value of the field has been modified.


End if



To make the list user-modifiable:



  1. In the List editor, select the list that you want to make modifiable.
  2. Pull down the Lists menu.
  3. If User Modifiable does not have a check mark, choose User Modifiable from the Lists menu.

4th Dimension adds a check mark to the menu command. The list can now be modified in the User environment.