Set search as calculation

Command group Flag affected Reversible Execute on client Platform(s)
Searches NO YES NO All


Set search as calculation {calculation}


This command sets the current search as the single line calculation specified. The calculation replaces the current search class if one has been set. A subsequent report, Search list or a Find command with Use search will use the search calculation.

Search calculations allow the index optimization routine in Omnis to select a suitable index, provided that such an index is available. Leaving the calculation blank has the effect of clearing the previous search calculation.


; Use Town index in fCustomers to find Londoners and then use search to locate Smiths.
Set main file {fCustomers}
Set search as calculation {fCustomers.Surname='Smith'}
Find on fCustomers.Town (Exact match,Use search) {'London'}
Do $cwind.$redraw()