I am trying to write a formula using the formula tool that has several IF statements involved. After setting the conditional statement up as in the graphic, i have received the following error:
"Parse Error at char(1184): Malformed If Statement (Expression #1) Parse Error at char(13): Malformed If Statement (Expression #2) Parse Error at Char(0): Empty expression (Expression #3) Parse Error at char(0): Empty expression (Expression #4) Parse Error at char(0): Empty expression (Expression #5) Parse Error at char(0): Empty expression (Expression #6) Parse Error at char(0): Empty expression (Expression #7)
Can someone help me figure out how to correct this?
Solucionado! Ir para Solução.
IF statements and Nested IFs (using ElseIF) need an Else statement before the final EndIF.
Therefore add something like
ELSE “Error”
ENDIF
and it should work.
as a tip, when there is an error in the statement the text turns to black to show you were the error is.
Hi @ebowlan ,
add an "ELSE" statement between the last "ELSEIF" and "ENDIF". The structure always has to be:
IF
ELSEIF
ELSE
ENDIF
Best,
Roland
Solving with 2 formula tools and 1 summarize
if [Voucher_Date]>= 2021-04-01 AND [Voucher_Date]<=2022-03-31 then '2021-2022'
elseif [Voucher_Date] >= 2022-04-01 AND [Voucher_Date]<= 2023-03-31 then '2022-2023'
else '2023-2024 '
Endif
still showing here... malformed if statement