Best way to check if an item in one list is in another list of items?

Hello fellow Bubble community,

I am looking for help on the best way to write this expression.

I have a list of items [A, B, C] in a state and also a list in the pages data type [D, E, F]. I want to start an action Only when the states list of items [A, B, C] is also in the pages list of items e.g. [A, B, C, D, E, F] then perform this action.

So I am comparing two lists to see if the items in the first list is in the second list and then running an action when this statement is true.

Thanks for your help.

If you need to check that all elements from custom state [A, B, C] are in the other list [A, B, C, D, E, F] → you can use :contains list operator:

When "Page List" :contains list "Custom state List"

If you’d like to check if Page list has at least 1 item from Custom state List → operator :intersect with

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.