Functions and Arguments
Screening rules can use three basic functions:
Find(“<text>“), where <text> is a text string. It returns the result true if the interaction contains the exact string between quotes, ignoring case.
where <regular expression> is a regular expression (see Regular Expressions
It returns the result true if the interaction contains any string that matches the regular expression between quotes.
RegExMatch(“<regExp>“), where <regular expression> is a regular expression. It returns the result true only if the entire content of the interaction matches the regular expression between quotes.
All functions have one required argument, which must appear between double quotation marks, as represented above (<text>) or (<regular expression>). This required argument can be followed by one or two optional arguments, depending on the function. The full form of each function, including all arguments, is as follows:
The IgnoreCase argument must be a Boolean value (true or false). All three functions ignore case in searches unless you include the IgnoreCase argument with a value of false.
Find(“pacific“) finds Pacific
Find(“Pacific“,false) finds Pacific
but not pacific.
You can also substitute true for false—for example, Find(“Pacific“,true)—which means that case is ignored. So Find(“Pacific“,true) is the same as Find(“Pacific“).
The key argument must be a string. If this argument is present, the system creates a key-value pair with the following characteristics:
The key name is the string specified by the key argument, prefixed by ScrKey_.
The value is the material that the screening rule matches.
The system then adds this key-value pair to the interaction’s attached data.
For example, RegExFind(“[A-Z]\d\d\d”,”ID_code”,false):
Finds strings consisting of a capital letter followed by three digits (see
Attaches to the interaction a key-value pair called ScrKey_ID_code whose value is A123, X005, M999, or whatever the function found in this interaction to match the regular expression.