hey community, I’m working on this formula to return a simple “Y” or “N” based on whether or not a date is past. The items in the grid could either be on a single date, or could have both a start date and an end date. I’ve tried a couple different ways of writing this formula but getting a lot of errors.
What I’d like to do is: “if the end date field is empty, determine whether or not the event is in the past based on the start date field; otherwise [if the end date field has a date], determine whether or not the event is in the past based on the end date field.”
Here’s your original formula field in a formatted view.
The first issue is on lines 9 & 10.
The parenthesis on line 10 closes the first IF statement. This means that if your first IF statement returns false, then it is returning blank, as there is not a declared argument parameter for the FALSE part of the IF formula syntax.
Thus, everything after the parenthesis on line 10 is considered another formula altogether.
That means that the closing parenthesis included on line 19 is just free-floating and isn’t attached to a statement. This would also be a source of a syntax error.
If you were to remove the comma on lines 10 & 19, and added an ‘&’ between the two statements, you would just have two separate IF statements that would return a combination of two values or just blank values depending on the input of the End Date and/or the Start Date.