Help with SEARCH() Formula


#1

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

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!


#3

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), "!", "")