May 21, 2024 06:12 AM
Hi there,
I dont understand the difference between 2 formulas :
IF(
AND(
{Startdatum Leverancier (rol repowered)} != BLANK(),
{Einddatum leverancier (rol repowered)} = BLANK()
),
"OT",
IF(
AND(
{Startdatum Leverancier (rol repowered)} = BLANK(),
{Einddatum leverancier (rol repowered)} = BLANK()
),
"",
"BT"
)
)
This formula does NOT work as intended and ALWAYS shows OT regardless of the 2 fields content (empty or filled). I need to add that these fields are date fields.
IF(
{Startdatum Leverancier (rol repowered)} = BLANK(),
"",
IF(
{Einddatum leverancier (rol repowered)} = BLANK(),
"OT",
"BT"
)
)
This one DOES work as intended. Although I fixed the issue my curiousity is getting the better of me what I did wrong in the first bit of code. Anybody ideas?
May 21, 2024 07:39 AM
"Note
When using BLANK() along with != (not equal to), you may receive unexpected results if the fields you are selecting aren't numeric."
May 21, 2024 07:42 PM
Hi.
Airtable formulas are quite flexible. You don't need to use BLANK. Statement 'if value X exists, show Z, otherwise show Y' will be IF(X,Z,Y)
You can even omit 'value if false', the default is 'show nothing' : if(X,Z)
therefore, you can do it in such way:
IF({Startdatum Leverancier (rol repowered)},
IF({Einddatum leverancier (rol repowered)},'BT','OT'))