How to write if statement ?

Hello All,   I've seen a lot of other posts asking how to use if statements and most of the answer are that you can't. It's pretty weird to me since as you can see in the screenshot below, the debugger tells me I can use 'if'   Now, how am i supposed to write if statement so that I don't have any errors ? I pretty much tryed every format I know but nothing gets rid of the error   Thanks in advance,
2 answers

You can just do something like this: 


if true then parseDateTime('2024-08-24','YYYY-MM-dd') else [%CurrentDateTime%]


Just replace "true" with your expression of course.



Hi, Thomas RICHARD


if myVar = true then retrieve list where myDate >= PreviousObjectDate and myDate <= CurrentObjectDate else retrieve list where myDate <= CurrentObjectDate


i hope it will help you 

Thank You, 

K. Ravi Kumar.