Problem with IF OR FIND formula (backslash)

Topic Labels: Formulas
1150 3
Showing results for 
Search instead for 
Did you mean: 
5 - Automation Enthusiast
5 - Automation Enthusiast

I am trying to write a simple formula: If field X contains ‘Apples’ or ‘Cats’, or ‘Chocolate’, or ‘Dogs’, then ‘Enter in the database’.

I am not well-versed in formulas, as you will see, and am probably using a convoluted way, which is the following:

IF( OR( FIND(‘Apples’, {Field X}), FIND('Cats, {Field X}), FIND(‘Chocolate’, {Field X}), FIND(‘Dogs’, {Field X})), ‘Actionable’). The formula works for the first two values, but breaks on the last two. (Airtable also inserts backslashes there.) Can someone kindly help me figure this out?


3 Replies 3

What kind of field is {Field X}? It matters because certain field types are holding arrays behind the scenes, rather than strings, and the FIND() function is designed to search a string, not an array.

As a failsafe, regardless of the type of field {Field X} might be, you could try coercing {Field X} into a string by concatenating it with an empty string like this:

      FIND('Apples', {Field X} & ''),
      FIND('Cats', {Field X} & ''),
      FIND('Chocolate', {Field X} & ''),
      FIND('Dogs', {Field X} & '')

Try that, and see if it gets you the result you are wanting.

Thank you. Unfortunately, that didn’t work. (The actionable only shows up for ‘Apples’. And backslashes continue appearing in the formula once posted.

Field X is a single line text field.

Are you able to post a screenshot of the formula you have and the issue you are experiencing?