You have too many arguments in your first IF() statement. An IF() takes three arguments, and you have given it four.
Hi @Asaf_Pedro!
I’m usually the one asking questions in these forum, but would like to finally be able to provide someone else with an answer, so I’ll try to do this with your question and hopefully I’ll make sense.
IF arguments work like this:
IF({field has a value},
'do this',
'otherwise do that'
)
OR
IF({field}='has a specific value',
'do this',
'otherwise do that'
)
Additionaly, the way your example shows you don’t have to ask the if the condition is true
{field 2}=TRUE()
If field 2 has a value - wheather that be text, a date or a checked checkbox - it is already registering as true.
If you on the other hand have a value called “TRUE()” that you are looking for then you need to ask for that specifically.
{field 2}=‘TRUE()’
In your case you want to achive three different outputs (three different values), but the way it is structured Airtable reads it as you wanting four different values.
IF({condition 1 is met},‘do this’,‘otherwise do that’, IF({condition 2 is met}, ‘Do this instead’,‘or nothing at all’))
Or in your case
IF({field}=TRUE(),“value 1”,“Value 2”),IF({field 2}=TRUE(),“Value 3”,“Value 4”))
That you haven’t written out “value 4” doesn’t matter, Airtable reads it as such anyway.
If you indeed want it to actually give you four different outputs you can simply have the formula say
IF({field},'value 1','Value 2')&''&IF({field 2},'Value 3','Value 4')
No need to nest the formula.
If you on the other hand want just the three different outputs, then you can achive this by changing the order of your conditions and nesting the formula.
IF({field 2},'Value 3', {field}, 'value 1','value 2'))
and a bit prettier with indentations:
IF({field 2},
'Value 3',
IF({field},
'value 1',
'value 2'
)
)
I hope that all makes sense.
You have too many arguments in your first IF() statement. An IF() takes three arguments, and you have given it four.
Thank you so much! Although, It’s a bit confusing, that “airtable” confirmed the formula update rather than say it’s an error.
Hi @Asaf_Pedro!
I’m usually the one asking questions in these forum, but would like to finally be able to provide someone else with an answer, so I’ll try to do this with your question and hopefully I’ll make sense.
IF arguments work like this:
IF({field has a value},
'do this',
'otherwise do that'
)
OR
IF({field}='has a specific value',
'do this',
'otherwise do that'
)
Additionaly, the way your example shows you don’t have to ask the if the condition is true
{field 2}=TRUE()
If field 2 has a value - wheather that be text, a date or a checked checkbox - it is already registering as true.
If you on the other hand have a value called “TRUE()” that you are looking for then you need to ask for that specifically.
{field 2}=‘TRUE()’
In your case you want to achive three different outputs (three different values), but the way it is structured Airtable reads it as you wanting four different values.
IF({condition 1 is met},‘do this’,‘otherwise do that’, IF({condition 2 is met}, ‘Do this instead’,‘or nothing at all’))
Or in your case
IF({field}=TRUE(),“value 1”,“Value 2”),IF({field 2}=TRUE(),“Value 3”,“Value 4”))
That you haven’t written out “value 4” doesn’t matter, Airtable reads it as such anyway.
If you indeed want it to actually give you four different outputs you can simply have the formula say
IF({field},'value 1','Value 2')&''&IF({field 2},'Value 3','Value 4')
No need to nest the formula.
If you on the other hand want just the three different outputs, then you can achive this by changing the order of your conditions and nesting the formula.
IF({field 2},'Value 3', {field}, 'value 1','value 2'))
and a bit prettier with indentations:
IF({field 2},
'Value 3',
IF({field},
'value 1',
'value 2'
)
)
I hope that all makes sense.
Thank you so much! I really appreciate the thorough explanation! Looking forward to trying it out
!
Hopefully I’d be able to help as well
, when I am more adamant with “airtable”.