This function returns a set.
Syntax and Details
term_list_name is a string expression that evaluates to the name of a term list.
flag, which is optional, is either "EXCLUDE" or "INCLUDE" (the default).
This function returns a set that, by default, consists of members that are identified by the key values in the term list, in combination with the term list pattern. The term list pattern indicates the level to which the members belong, and indicates how to create the full identifiers for the members.
If you specify flag as "EXCLUDE", the set instead consists of all members of the given level except for the ones identified in the term list.
For information on defining term lists, see “Defining Term Lists” in Advanced Modeling for InterSystems Business Intelligence.
For example, suppose that for HoleFoods, we have a term list named MyCities that is defined as follows:
Suppose that this term list has the following Pattern expression:
Then for this term list, the %TERMLIST function returns a set that consists of the Atlanta, Boston, and New York members of the City level. That is, the following two expressions are equivalent:
When used with the %OR function, %TERMLIST is particularly useful for filtering. For example:
SELECT FROM holefoods %FILTER %OR(%TERMLIST("MyCities"))