Built-in Functions → inList
inList() is a boolean function that evaluates a field expression and a variable containing a list of items, and returns true if any of the items can match all or part of the expression. It returns false if no match can be found.
Signature
inList(string expr field, list)
- field :
string
expression to search - list : variable containing one or more
string
values
Note
A variable can be supplied as the second argument which might contain a large list of data. As an example, inList
might be used to define a data security filter either in the Table Details page or in an Insight.
Returns
bool
Example
In this example, country_list contains the two element list "Spain" and "Germany".
inList(SALES.COUNTRIES.COUNTRY_NAME, $country_list)