IntersectSelection (sel1, sel2OrExprText, [sortExpr], [descending])

Result Type: Selection

Definition: Returns a new selection which is the intersection of the given selections. The new selection may optionally be sorted by passing a sort expression. The first selection must be a selection variable; the second one may be an existing selection variable or can be specified on the fly using a search expression. Obviously, both selections must be for the same table.

Examples:  IntersectSelection(t1, "type = `DI@`")

returns a selection containing the transactions in the previous created selection t1 which are debtor/sales invoices.

intersectSelection(d1, "detail.stockcode=`B@`")

returns a selection containing all detail lines in the existing selection d1 which have a product code starting with B.

See Also:

CreateSelection: Create a selection of records

DisplaySelection: Display standard list window for a given selection of records

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