Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Apr 23, 2021 02:46 AM
Does anyone know if it’s possible to run an if() formula for a keyword in a lookup field. (see screenshots below)
Im looking to return a ‘true’ or ‘false’ if it contains the word “Floorplan” however i believe that the lookup fields are not considered searchable by the formula as it is returning ‘false’ even when the parameters are meet?
Can anyone confirm if my suspicions are true and if so how can i go about making the lookup field compatible so it returns the correct answer in my if() formula
Thanks in advance
Solved! Go to Solution.
Apr 23, 2021 08:05 AM
Welcome to the Airtable community!
Using lookup fields in formulas can be tricky because lookup fields are usually arrays, not simple values. One option is to convert the lookup to text string using & ""
.
IF({Job Requests} & "" = "Floorplan", 'TRUE', 'FALSE')
Also note that this formula will only return "TRUE"
if there is an exact match, and not if there are any other words in the lookup.
Apr 23, 2021 08:05 AM
Welcome to the Airtable community!
Using lookup fields in formulas can be tricky because lookup fields are usually arrays, not simple values. One option is to convert the lookup to text string using & ""
.
IF({Job Requests} & "" = "Floorplan", 'TRUE', 'FALSE')
Also note that this formula will only return "TRUE"
if there is an exact match, and not if there are any other words in the lookup.
Apr 26, 2021 01:57 AM
Thanks so much! I ended up using the below formula as the word “floorplan” could appear anywhere in the string and along with other words in the lookup field like you mentioned.
(IF(SEARCH(“Floorplan”, {Job Requests}&’’)>0,‘1’,‘0’))
I was then able to use the numerical value in further equations.