Skip to main content

Hello Airtable community!

 

I’ve got a new IF formula that’s giving me trouble - I’m trying to format titles from our database for a distributor that needs the components in a certain order, which changes based on other parameters. To begin with, I was able to set up a statement that only targeted records where the format is listed as “Issue” and then get the root of the new title created with existing fields like so:

UPPER(IF({Format Type}="Issue",CONCATENATE({Title w/o Article}," ","#"," ",{CVR A, B, C}," ",{Cover Artists}," ","VAR"),""))

That gives me, as an example, MADE UP TITLE #1 CVR A PABLO PICASSO VAR and also returns an empty field for anything that’s not an ‘Issue’. The problem with this formula is that if it’s CVR A, then there shouldn’t be a ‘VAR’ at the end. So I tried to modify that with an IF(AND( statement, and every version I’ve tried breaks down, like this:

UPPER(IF(AND({Format Type}="Issue",{CVR A, B, C}!="CVR A", CONCATENATE({Title w/o Article}," ","#",{Issue #}," ",{CVR A, B, C}," ",{Cover Artists}," ","Var"),IF(AND({CVR A, B, C}="CVR A",CONCATENATE({Title w/o Article}," ","#",{Issue #}," ",{CVR A, B, C}," ",{Cover Artists}))),"")))
I was trying to ensure it would still return an empty field when the Format Type isn’t ‘Issue’, but this version returns nothing. I feel like if I can crack this piece, I may be able to add the other necessary IF statements. Please help!

Hey there ​@emdeesee , thanks for submitting such a great question! Because your question hasn't yet received an answer/solution from the Community, we've created s support case on your behalf with our Airtable Expert Team to get you the quickest, best response possible. Please check your email for follow-up and your case reference number—and continue to follow this thread as new community members tend to share answers and add knowledgeable responses regularly.


Hi,
 

UPPER(IF({Format Type}="Issue",CONCATENATE(
{Title w/o Article},' # ',{CVR A, B, C},' ',{Cover Artists},
IF({CVR A, B, C}!='CVR A',' VAR'))
))


Tips:
Use   IF({Field}, result … - to check for ‘emptiness’

In formula IF( condition, result_if_true , result_if_false)  , the last parameter can be omitted and default is empty string. You can use to IF( condition, result_if_true)


When you have  {a long expression with multiple fields and some operations} finished with One, Two or Three according to {Number} field, you are using
IF({Number=1, {a long expresiion with multiple fields and some operations} & ‘ One’,
  IF(Number=2, {a long expresiion with multiple fields and some operations} & ‘Two’…
.

instead, use
{a long expresiion with multiple fields and some operations}  &
  IF(Number=1, ’One,  IF(Number=2, ‘Two….


about last example - when the number of multiple choices more than 2, usually it’s better to use SWITCH(Number, 1, ‘One’ , 2 , ’Two’...