Sep 05, 2021 06:33 PM
Is there a way for a formula to appear only on certain conditions? For example, I have the following situation:
Here is the formula that I currently have:
DATETIME_FORMAT(DATEADD({Clinic Date}, 3, ‘week’),“MM-DD-YYYY”)
Is there a way to set up that additional condition so I don’t further clutter up my database?
Thanks in advance to anyone who can assist!
Solved! Go to Solution.
Sep 06, 2021 08:30 AM
While @Joseph_Abraham is correct, there are a couple of other things to point out:
IF()
function is false, you don’t need to use BLANK()
as the final argument. You can leave that off and Airtable will automatically leave the field empty.With those concepts applied, the formula becomes this:
IF({Number} & "",DATETIME_FORMAT(DATEADD({Clinic Date}, 3, 'week'), 'MM-DD-YYYY'))
Sep 05, 2021 07:01 PM
You can check if a cell is blank by simply referencing the cell you want to check in the logic part of the IF statement. Here is the formula I would use:
IF({Number},DATETIME_FORMAT(DATEADD({Clinic Date},3,'week'),'MM-DD-YYYY'),BLANK())
Sep 06, 2021 08:30 AM
While @Joseph_Abraham is correct, there are a couple of other things to point out:
IF()
function is false, you don’t need to use BLANK()
as the final argument. You can leave that off and Airtable will automatically leave the field empty.With those concepts applied, the formula becomes this:
IF({Number} & "",DATETIME_FORMAT(DATEADD({Clinic Date}, 3, 'week'), 'MM-DD-YYYY'))
Sep 06, 2021 01:07 PM
Thanks to you both! This worked for me!
Sep 06, 2021 02:43 PM
Thanks @Justin_Barrett! TIL that a zero will also be treated as false when using the field-name-only test. I will keep your workaround in mind next time!