contains Function | Vantage CX - 1.4 - contains - Vantage Customer Experience

Vantage Customer Experience User Guide

Product
Vantage Customer Experience
Release Number
1.4
Release Date
June 2021
Content Type
User Guide
Publication ID
B035-3800-099K
Language
English (United States)

Returns all the values that are contained within another list of values. The contains function is used only within the context of the filter or is functions.

Example 1:

count(
                filter(
                                get("Account.cart"),
                                "items",
                                contains(list("3","4"))
                )
) >0

The example returns true when there are any rows for items that have the values 3 or 4.

Example 2:

count(
                filter(
                                get("Account.cart"),
                                "products",
                                contains(get("Account.clearance.products"))
                )
) >0

The example returns true when there are any rows for the cart products that are in the list of clearance products.