FILTER formula output rows with .Contains

Hi all,
I try to filter rows in Products table where thisrow is among the Products multiple select lookup column of other table in its rows there a Boolean column = true.

I think this screenshot tells the issue better:


Doc with an example

I know the rows type of output won’t match with a text, this is why I tried with both keeping the Row method and also the .totext method (exact formulas are at the bottom), but both returned 0 rows.

What is the correct formula? :slight_smile:

Hi @Balint,
and welcome to Coda Community! :handshake:

I think your approach is correct, the only little issue here is with the outcome list.

Being a multiple select, the Tastings.filter(...).Products returns a list of a list of products
You just need to flatten them in a list of products through ListCombine().

Therefore, in your filter you can put:

thisRow.In(Tastings.Filter([Show Products?]).Products.ListCombine())

I hope this helps.

Edit:

  1. I guess @Ander and myself posted in the exact same second :smiley:
  2. Note that you can avoid the explicit =True() in a boolean value
  3. I just switched ....Contains(thisRow) to thisRow.In(...) , but it’s basically the same
4 Likes

@Balint

Try this: Tastings.Filter([Show Products?]=true).Products.ListCombine().Contains(thisRow)

3 Likes

Thanks to both of you, all could be marked as (quick) solution! :slight_smile:

2 Likes