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 be 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 displayed (you can use the undo statement to go back to the previous selection). You may use the info(“empty”) function to test to see if a selectwithin failed. Or, you can use the checkemptyselection statement immediately after the selectwithin statement to automatically undo the selection and display a notification if no records were selected.


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.