MoneyWorks Manual
CreateSelection (tableName, searchExpr, [sortExpr], [descending])
Result Type: Selection
Definition: Creates a new selection of records which can be used in a foreach loop. SortExpr can be a field name or a more complex expression. Pass 1 for the 4th parameter for a descending sort. The default (0) is ascending.
Example:
CreateSelection("transaction", "NameCode=`SPRING`", "TransDate")
Creates a selection of all transactions with a Namecode of “SPRING”, sorted by transaction date.
Note: The search expression can also be one of the meta-search mnemonics *found and *highlight, to display the found and highlighted sets respectively.
See Also:
DisplaySelection: Display standard list window for a given selection of records
IntersectSelection: Intersect a selection with the result of another search
RecordsSelected: Count records in a selection or resulting from a (meta) search
SumDetail: Add up a field for details matching a search
SumSelection: Add up a field for records matching a search
UnionSelection: Add the result of another search to a selection