|
This function returns the next value for a
field. If the field/table specified HAS NOT had an 'ID INCREMENT'
value initialized, NEXTID will return the next highest value contained in
the field. NEXTID(Field , Table)
PARAMETERS
Field
The FIELD you wish to retrieve the next id
for.
Table
The TABLE the field is contained
in.
Example: To
automatically save the next valid ID value into the ID field on your
current form whenever a new record is added, place the following code in
your forms ON ADD event.
(note: Assumes your ID field is bound to a textbox with tag value
of IDFIELD, and that your FORM is bound to a table named
MyTable.)
SETVALUE(~IDFIELD~//NEXTID(ID,MyTable)) |