Skip to content

is_in_list

Syntax

is_in_list(list-expression, expression)

Parameters

list-expression
The list being checked.
expression
The value to search the list for.

Returns

Predicate that checks if an item is in a list.

1 (true) if the value of the list-expression has an item whose value is expression. 0 (false) otherwise.

Description

This expression evaluates to true if the value of the list expression parameter contains an item with a value matching the second argument.

Examples

If there is a list of agents, Agent_List, then the following conditional applies only to agents whose ID is in the list:

if (is_in_list(Agent_List, id())) then ...

See Also