Skip to content

CONTAINSLIST

Usage

Use this function to check whether the values of a list are contained in another list

Category Function Type Where to use Argument statement
FUNCTION SERVER ROW COMPARISON .VALUE

Syntax

1
=CONTAINSLIST(Values_List_1; Values_List_2)

Arguments

Values_List_1
Values list where checking if Value_List_1 argument is contained: any list (you have to use LIST function) composed by constant values, System Variables, column field value (#Storage_Name.Field_Name.VALUE or .OLDVALUE) or a function-returned list of values (LOOKUPLIST function)

Value_List_2
Value list to check in the Values_List_1 argument: any list (you have to use LIST function) composed by constant values, System Variables, column field value (#Storage_Name.Field_Name.VALUE or .OLDVALUE) or a function-returned list of values (LOOKUPLIST function)

Note

The CONTAINSLIST function can be used as a conditional argument in Client Function if Values_List_1 and Value_List_2 are not depending on record's fields value

Return Value

Boolean (true or false)

Examples

Example 1

Formula
=CONTAINSLIST(
=LIST("Data 1"; "Data 2"; "Data 3");
=LIST("Data 1"; "Data 2")
)

Description
Check if the value list Data 1, Data 2 is contained in the list Data 1, Data 2, Data 3

Result
true

Example 2

Formula
=CONTAINSLIST(
=LIST($CURRENTUSER.GROUPNAMES);
=LIST("Group 1"; "Group 2")
)

Description
Check if the value list Group 1, Group 2 is contained in the Groups list of the current User (variable). So if the User is in the Group 1 and Group 2

Result
true or false

Example 3

Formula
=CONTAINS(
=LOOKUPLIST(#HR; #HR.Team; #HR.Department == "Production");
=LIST("Quality Assurance"; "Designing")
)

Description
Check if the value list Quality Assurance, Designing is contained in the list returned taking from Storage HR the Team where Department is equal to Production (LOOKUPLIST function)

Result
true or false