select
CONDITION

The select statement makes visible only those records for the active database for which the specified condition is true.


Parameters

This statement has one parameter:

condition – is a Boolean formula (a formula with a true/false result).


Description

This statement is used to make visible all records for which a specified Boolean formula is true. All records not matching the Boolean formula will become invisible. If a subset of records has already been selected from the database, select will examine all records looking for a match.

This example selects all records for John Smith.

select Customer = "John Smith"

This example selects all records for Votes over 12000.

 select Votes > 12000

This example selects all records on or after January 1 2010.

select Shipped > date("1/1/2010")

In this example the info(“empty”) function is used to test to see if no records were selected for the date entered.

local ADate
gettext "Enter date ex. 12/31/95",ADAte
select ProcessDate = date(ADate)
if info("empty")
    beep
    message "No records match this date: "+ADate
    stop
endif
...
...
...

Note: If no records match the Boolean formula, all records will be selected (you can use the safeselect statement if you don’t want this to happen). Panorama doesn’t allow the entire database to be invisible. See Handling Empty Selections in Code to learn about how to handle failed selections in your code.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but no longer displays a notification if the selection fails, even if this is the last statement in the procedure.