API : How can I filter with "has none of"?

Topic Labels: Formulas
1049 1
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

Hi there,

Hope you’re doing well !

Can someone help me to formula-translate “has none of” please ? :slightly_smiling_face:

What i need to do is to make a webhook call to filter some results and only take the ones which does not contains “SFR or Orange” in “which_network”.

Thanks a lot

Capture d’écran 2021-06-10 à 09.09.28

1 Reply 1
6 - Interface Innovator
6 - Interface Innovator

OR(FIND("SFR", ARRAYJOIN({which_network})), FIND("Orange", ARRAYJOIN({which_network})))

This will return 1 if either of the two terms appear in the multi-select field, and otherwise returns 0. This will let you duplicate the “has none of” behavior.

To set it up so that it will also return 1 if the field is empty, use:

IF({which_network}, OR(FIND("SFR", ARRAYJOIN({which_network})), FIND("Orange", ARRAYJOIN({which_network}))), 1)

That will allow you to filter to only get items that have some selection other than “Orange” or “SFR”. This is not quite the same as the “has none of” filter, but it might be useful for your purposes.