selectwithin
CONDITION

The selectwithin statement uses a Boolean formula to exclude records from a previously selected group.


Parameters

This statement has one parameter:

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


Description

This statement uses a Boolean formula to exclude records from a previously selected group. Records in the database that have already been selected will be checked to see if they should still be selected, while all previously unselected records will remain invisible.

This example selects all records for Hawaii and then narrows that group down to records in Lahaina only.

select State = "HI"
selectwithin City = "Lahaina"

Of course there is no reason to use separate statements like this, normally you would combine these into a single statement:

select State = "HI" and City = "Lahaina"

However, selectwithin is useful when you don’t know all the criteria in advance, but want to incrementally refine the selection.

Note: If no records match the Boolean formula, all records will be selected (you can use the safeselectwithin 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.