I keep getting an error message " Parse error at char 121: Unmatched Expression and I am not sure why. The error is right before the 2nd "Then" and I am not sure what is wrong with the syntax, can someone point out what I am doing wrong?
IF [1st GI]>"2022-12-31" AND [2nd GI]>"2022-12-31"
THEN "Delivered"
ELSEIF ([1st GI] > "2022-12-31" AND (ISEMPTY([2nd GI])
THEN "In Transit"
elseif
contains([1st GI],"ESD") AND (ISEMPTY([2nd GI]) OR Contains([2nd GI],"ETA"))
THEN "Planning TBD"
ELSE "NA"
ENDIF