Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

How to do multiple If(field) = text, then "value" "value" in one FX box?

Topic Labels: Formulas
942 2
cancel
Showing results for 
Search instead for 
Did you mean: 
esu
5 - Automation Enthusiast
5 - Automation Enthusiast

I'm trying to automatically populate emails depending on team member names.

So if "John Smith" then in this column "john.smith@email.com" ""

And if "Kate Jones" then "kate.jones@email.com" ""

etcetcetc

for about 30 team members. I can get the first formula to work but how do i do it for multiple?

 

Tried this but didnt work

IF({Name} ="x", "email x"

IF({Name} ="y", "email y",

 ) )

2 Replies 2
esu
5 - Automation Enthusiast
5 - Automation Enthusiast

found it -- i was missing an &.

close each if statement, add & between

Hi,
Airtable has formula operator exactly for multiple choice:

SWITCH({Name},
'x','email x',
'y','email y',
'default value(optional)')


but in general, hardcoding such tables in formulas is a bad practice. as soon as you start using it in 2 or more places, and team list will change, you will find it harder and harder to maintain.
it's pure Airtable basics - when you store list of team members as a single source of truth, when you need email and other info, you add field, linked to 'Team list' table and get all additional data via lookups.