Hi, I would like to construct the following statement:
If {check 1} is filled in with a date, then return the value of 10 days after the date of check 1
If {check 1} is blank, then leave the current cell blank
The following is what I’ve tried, would appreciate some suggestions.
IF({check 1} is not blank,(DATEADD{check 1},10,'date), ())
(Either can be copy-and-pasted into your formula field.)
You don’t need to declare explicitly {Check 1}!=BLANK(), as IF({Check 1}… contains an implied ‘is not a blank|empty|null’ value. I seem to recall instances where an explicit comparison ran afoul; for instance, when Field='' (that is, an empty string), IF(Field=BLANK() might confusingly evaluate to FALSE under some circumstances, but TRUE under others. (Admittedly, other of my mistakes may have caused the error — but the abbreviated version always evaluates as one expects.)
Similarly, strictly speaking, the final BLANK() isn’t necessary; you could delete it and the comma after DATEADD(). I go back and forth on this question; lately, though, I’ve tended to leave it in, mainly because, 10 months from now, should I have reason to revisit the code, it will take me a few seconds less to figure out what it does.
And make sure your unit specifier is 'days' or 'd'. DATEADD() might match the ‘d’ in 'date' and be happy; then, again, it might not.
Thank you SO MUCH!!!
It worked beautifully, and I appreciate the explanation - I feel feel a bit smarter now :slightly_smiling_face:
Hello from a beginner – I have a situation where if Amy is the editor, the {Amy Needs To Approve} field should show 1 workday after the {Upload Date} field, but IF Amy is not the editor the {Amy Needs To Approve} field should stay blank. Using the post above as my template, I came up with the following, but am now getting blanks in all records. I would so appreciate your help with tweaks!
Hello from a beginner – I have a situation where if Amy is the editor, the {Amy Needs To Approve} field should show 1 workday after the {Upload Date} field, but IF Amy is not the editor the {Amy Needs To Approve} field should stay blank. Using the post above as my template, I came up with the following, but am now getting blanks in all records. I would so appreciate your help with tweaks!
It sounds like either your condition is always evaluating as false, or else your WORKDAY() formula is producing blanks.
Check:
That {Editor} = "Amy" is capable of evaluating as true; do this by creating a separate, throw-away formula field and just typing that as the formula to see the result – adjust it until you get it properly returning 1 when "Amy" is found in that field, and 0 when it’s not.
Your formatting of the field name in WORKDAY({UploadDate}, 1) is correct – in your description you typed the field name as {Upload Date}; make sure that discrepancy isn’t causing errors in your formula
It sounds like either your condition is always evaluating as false, or else your WORKDAY() formula is producing blanks.
Check:
That {Editor} = "Amy" is capable of evaluating as true; do this by creating a separate, throw-away formula field and just typing that as the formula to see the result – adjust it until you get it properly returning 1 when "Amy" is found in that field, and 0 when it’s not.
Your formatting of the field name in WORKDAY({UploadDate}, 1) is correct – in your description you typed the field name as {Upload Date}; make sure that discrepancy isn’t causing errors in your formula
Such a great tip to try out each section of the formula separately.
And it did turn out to be a matter of accurate nomenclature. Not in whether the field name was 1 word or 2 (somehow I’d gotten that right), but in how I’d populated the records. There were no fields where Editor=“Amy” because the field content actually said “Amy Asch.” Duh!
I’m curious. Is there a way to set up something like IF field contains/does not contain, rather than IF Field equals?
Such a great tip to try out each section of the formula separately.
And it did turn out to be a matter of accurate nomenclature. Not in whether the field name was 1 word or 2 (somehow I’d gotten that right), but in how I’d populated the records. There were no fields where Editor=“Amy” because the field content actually said “Amy Asch.” Duh!
I’m curious. Is there a way to set up something like IF field contains/does not contain, rather than IF Field equals?