How can I combine these multiple IF statements for use in a calculated field? | Community
Skip to main content
Christina_Jarosz
New Participant
January 7, 2020
Question

How can I combine these multiple IF statements for use in a calculated field?

  • January 7, 2020
  • 2 replies
  • 801 views
How can I combine these multiple IF statements for use in a calculated field? IF({What is your line of business?}="PSG","PSG"), IF({What is your line of business?}="RPS","RPS"), IF({What is your line of business?}="GOV","GOV"), IF({What is your line of business?}="FUT","FUT"), IF({What is your line of business?}="CORP","CORP") I just want one value to display in the calculated field = either PSG, RPS, GOV, CORP, or FUT. Any suggestions?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Doug_Den_Hoed__AtAppStore
New Participant
January 8, 2020
Glad you got it going Christina, Assuming this is a dropdown, since your formula effectively checks the value of the "What is your line of business?" parameter than then returns that value, I wonder if the formula could simply have instead been ={DE:What is your line of business?} which I believe would yield the same result. If there is some other reason to use a formula (e.g. I sometimes do so to consolidate dropdowns values into broader categories), the formula you're using would make a better starting point, but in that case, I'd also suggest you add a final else value as a safety net clause , for when (eventually) some new dropdown option is added, as a reminder that this formula needs to then be updated accordingly: IF({What is your line of business?}="PSG","PSG", IF({What is your line of business?}="RPS","RPS", IF({What is your line of business?}="GOV","GOV", IF({What is your line of business?}="FUT","FUT", IF({What is your line of business?}="CORP","CORP" ,"UNKNOWN" ))))) Regards, Doug Doug Den Hoed - AtAppStore
New Participant
September 26, 2024

Hi Doug, related to your solution above, is there a way to return the value(s) from one multi-select custom field that lives in a group of multi-select custom fields? For example, {DE:What is your line of business?} and {DE:What is your favorite color} and {DE:What is your pet's name?} sit on the same project form, and only one is required to be filled out, so we would only need return the value(s) that were selected from that one field? 

Christina_Jarosz
New Participant
January 8, 2020
For anyone that stumbles upon this later, here was the answer: IF({What is your line of business?}="PSG","PSG", IF({What is your line of business?}="RPS","RPS", IF({What is your line of business?}="GOV","GOV", IF({What is your line of business?}="FUT","FUT", IF({What is your line of business?}="CORP","CORP")))))