Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

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

Topic Labels: Formulas
326 1
cancel
Showing results for 
Search instead for 
Did you mean: 

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

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.