findid
ID

The findid statement locates a record in the active database by its ID number (see info(“serverrecordid”).


Parameters

This statement has one parameter:

id – is an integer ID number. You can find out the ID number for existing records with the info(“serverrecordid”) or info(“matrixcellrecordid”) functions.


Description

This statement scans the current database from the top to locate a record by its ID number (see info(“serverrecordid”).

findid 712

Of course you usually wouldn’t use a constant value like this, instead you would use an id value you had retrieved earlier with info(“serverrecordid”) or info(“matrixcellrecordid”).

The info(“found”) can be used in conjunction with the findid statement. When used immediately after the findid statement, info(“found”) returns true if the find was successful or false if it wasn’t. There are two reasons why the FindID statement might not be successfull – either the specified record doesn’t exist, or it does exist and is not currently visible.

This example could be used as the procedure attached to a Matrix object (the Pass Thru option must be set to enable the [info(“matrixcellrecordid”) function).

findid info("matrixcellrecordid")
if info("found")
    BookingDate = today()
else
    message "Record has been deleted or is not currently visible!"
endif

Note: You can also find a record based on the ID number using the regular find statement, like this:

find info("serverrecordid")=712

However, because it is specialized for this task, the FindID statement is significantly faster.


See Also


History

VersionStatusNotes
10.0NewNew in this version.