Help

Re: IF Statement using Single Select selection

Solved
Jump to Solution
1710 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Mike_Buck
6 - Interface Innovator
6 - Interface Innovator

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)
1 Solution

Accepted Solutions
ScottWorld
18 - Pluto
18 - Pluto

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

See Solution in Thread

3 Replies 3
ScottWorld
18 - Pluto
18 - Pluto

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

Mike_Buck
6 - Interface Innovator
6 - Interface Innovator

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))

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! 😀