Contains - Item x AND (item Y OR Item Z) in coda language

Hi!

I want to apply a filter to a table, but I’m missing the right formula. Can anyone help?
What I want:
I only want to see items of a table where itemX = checked. In addition, I only want to see items that contain Y OR Z. So basically, itemX= checked always has to be true and from that selection I want coda to only show me the rows that contain either Y or Z.

What’s the right filter formula for that?

Hi @Patricia_Hoffmann :blush: !

Maybe this could work :

thisRow.X AND thisRow.Items.Contains(Y,Z)

where :

  • The condition 1 is: thisRow.X
    • It returns true if the checkbox X is checked

and

  • The condition 2 is: thisRow.Items.Contains(Y,Z)
    • It returns true if the value in the field Items contains either Y or Z

And for the filter to returns one or more rows, both conditions needs to be true (as I used AND) :blush:

Here’s a sample to illustrate :blush: .

The filter formula has been applied on the [View of Table] so you’ll be able to see the differences between the unfiltered source table called Table (where the results of the filter are highlighted through conditional formatting) and the actual filtered view.

I hope this helps :innocent:

Thank you so much!! It helped a lot :slight_smile:

My pleasure @Patricia_Hoffmann :grin: !

And I’m very glad to know this helped you moving forward :grin: !

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.