Use IN operator with an enumerated list
- Last Updated: December 17, 2020
- 1 minute read
- Corticon
- Version 7.2
- Documentation
When your rule condition or filter is not defined by a range of values, you
might have try to use a series of test and logical OR operations to describe the test. For
example, entity1.attribute1='This' or entity1.attribute1='That' or
entity1.attribute1='TheOther' is long, and could evolve into a very long
expression. You can eliminate the use of the long form of enumeration literals by using the
in operator's list format to reduce that filter or
condition expression to entity1.attribute1 in
{'This','That','TheOther'}.
You can go a step further by defining enumerated lists to define even more
brisk expressions, where the labels that you choose are abbreviations for the full names.
For example, Regions.state in {MA,NH,VT,CT,RI,ME} to
qualify only US New England states.
For more information about these features, see the topics in Qualify rules with ranges and lists.