find
CONDITION

The find statement locates the first visible record in the active database for which the specified condition is true.


Parameters

This statement has one parameter:

condition – is a boolean formula (a formula which results in a true or a false condition).


Description

This statement scans the current database from the top and locates the first visible record for which the specified condition is true.

This example makes the first visible record for John Smith the active record.

find Customer = "John Smith"

If the database contains separate fields for first and last names, the conditional formula can use the and operator.

find Last = "Smith" and First = "John"

This example makes the first visible record over 850 pounds the active record.

find Weight > 850

This example makes the first visible record for Jan. 2015 the active record.

find DateOpened >= date("1/1/15")

The info(“found”) is designed to be used in conjunction with the Find statement. When used immediately after the Find statement, info(“found”) returns true if the find was successful or false if it wasn’t. This example looks for a free booking date (a date field that is empty or contains zero), and if found, marks it booked with today’s date.

find BookingDate=0
if info("found")
    BookingDate = today()
else
    message "No booking dates available"
endif

Note: The Find statement finds the first occurence of the specified condition (closest to the top of the database). If you want to find additional occurences, use the nextmatch or findbelow statements.


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.