Skip to main content
Solved

IF Statement using Single Select selection


So I'm tracking vehicles in my base(s), and I typically use a formula for my primary field for ease of search for my coworkers:  CONCATENATE("Branch #"," ",Location," ",Year," ",Make," ",Model," ",VIN)

 
Ends up yielding something like Branch #123 2022 Ford F-150 1FTCR15X0TTA01050
 
This works really well for us, because we use that primary field in a wide variety of forms and other linked bases, so if someone doesn't know their vin, they can search by branch and narrow it down, etc.
 
What I'm trying to get my head around is how to (if possible) reference a single selects selection in an IF statement re: that primary field?  An order to request a new vehicle adds a new line to the base, and as we process the order at that point we add in make, year, model, etc.  Until we do that the concatenate formula just returns "Branch #123" because the other fields are blank so its hard for folks to track their orders and see any information.  We have a Single Select field where we have Status - On Order, Active, Sold, etc.  What I'd like to do is IF Status = On Order, the PO value is displayed in the primary field.  If Status is anything else, it uses our regular concatenate formula.
 
I could be butchering this or it could be a syntax error, but I'm trying:
 
IF({Status}="On Order",{Airtable Order ID})
,
CONCATENATE("Branch #"," ",Location," ",Year," ",Make," ",Model," ",VIN)

Best answer by ScottWorld

Yes, that will work, but move the right parenthesis from the first line and move it to the end of the formula.

View original
Did this topic help you find an answer to your question?

3 replies

ScottWorld
Forum|alt.badge.img+20
  • Brainy
  • 8747 replies
  • Answer
  • October 18, 2023

Yes, that will work, but move the right parenthesis from the first line and move it to the end of the formula.


  • Author
  • Participating Frequently
  • 8 replies
  • October 18, 2023

Thanks Scott.  Is it possible to use multiple single selects the same way?  Like if I wanted the IF statement to apply to several different of the single select options, not just On Order?

 
IF({Status}="On Order",{Airtable Order ID}
,
CONCATENATE("Branch #"," ",Location," ",Year," ",Make," ",Model," ",VIN))

ScottWorld
Forum|alt.badge.img+20
  • Brainy
  • 8747 replies
  • October 18, 2023

Yes, you would need to use the OR() function. here's an example with some fake values that I created:

IF(
OR({Status}="On Order",{Status}="Sold",{Status}="Backorder",{Status}="Brand New Order"),

CONCATENATE("Branch #"," ",Location," ",Year," ",Make," ",Model," ",VIN)
)
 
Also, you may want to bookmark this page, which references all of Airtable's formula functions.
 
By the way, if you have the budget to work one-on-one with an expert Airtable consultant, please feel free to contact me through my Airtable consulting website! 😀

Reply