Can we check if an array is included in another array?

Hi guys!

I am currently working on a recommendation system where users will select their criteria and I will fetch the right item from our database.

The current setup is as follow
When the user clicks on the criteria, the criteria will be added to a list of text stored as a page variable.
Items in the database will have a field that contains a list of criteria.

I would like to check if an item’s criteria array contains the user’s criteria array (the page variable).

I think CONTAINS only checks if a string is in an array, so I was wondering if there is a way to check if an array is in another array?

Thank you so much!!

Hi,

One sort of hacky way would be to use the UNION formula. If the UNION of the page variable list and the item’s criteria list is identical to the item’s criteria list, then that means all the criteria found in the page variable are also found in the item list.

Another approach is to use IS_IN_ARRAY and maybe mapping with MAP all the page variable criteria and check if they can be found in the item’s list too.