Skip to main content

Help with SEARCH() Formula

  • February 8, 2019
  • 2 replies
  • 42 views

Forum|alt.badge.img+19

I am super confused here… does the SEARCH() formula function not work when performed on a Lookup field?

The following formula performs correctly on the table containing the field {Description}, but NOT on the table which looks up the field {Description}.

IF(OR(SEARCH("HINO", Description) > 0, SEARCH("ISUZU", Description) > 0), "!", "")

2 replies

Forum|alt.badge.img+19
  • Author
  • Inspiring
  • February 8, 2019

Answered my own question I guess… I modified the formula to be:

IF(OR(SEARCH("HINO", ARRAYJOIN({Description})) > 0, SEARCH("ISUZU", ARRAYJOIN({Description})) > 0), "!", "")

And now it works!


Forum|alt.badge.img+5
  • Inspiring
  • February 9, 2019

Answered my own question I guess… I modified the formula to be:

IF(OR(SEARCH("HINO", ARRAYJOIN({Description})) > 0, SEARCH("ISUZU", ARRAYJOIN({Description})) > 0), "!", "")

And now it works!


You can also cast a lookup field (which returns as an array) into a string by appending an empty string to the field. That is, you could modify your original example to read:

IF(OR(SEARCH("HINO", Description&'') > 0, SEARCH("ISUZU", Description&'') > 0), "!", "")