Is new record

4D - Documentation   Français   English   German   4th Dimension 2003, Command Theme List   4th Dimension 2003, Command Alphabetical List   4th Dimension 2003, Constant Theme List   Back   Previous   Next

version 6.5


Is new record {(table)} Boolean

ParameterTypeDescription
tableTableTable of the record to examine or
Default table if this parameter is omitted
Function resultBooleanTrue if the record is being created,
False otherwise

Description

The command Is new record returns True when the table's current record is being created and has not yet been saved in the current process.

Compatibility Note: You can obtain the same information by using the existing command Record number, and by testing if it returns -3.

However, we strongly advise you to use Is new record instead of Record number in this case. Actually, the Is new record command ensures compatibility with future versions of 4th Dimension.

Example

The following two instructions are identical. The second one is strongly advised so that the code will be compatible with future versions of 4D:

   If (Record number([Table])=-3) `Not advised
      ` ...
   End if

   If (Is new record([Table])) `Strongly advised
      ` ...
   End if

See Also

Modified record, Record number.


4D - Documentation   Français   English   German   4th Dimension 2003, Command Theme List   4th Dimension 2003, Command Alphabetical List   4th Dimension 2003, Constant Theme List   Back   Previous   Next