Syntax error in value assigning with AddDays()

Hi. I met a syntax error when I assign into a local variable "DateOrder" with a new value (one day later)

My expression was like

AddDays( DateOrder, 1 )

but it doesn't work. An error "Syntax error caused by unexpected '' element in expression." is always shown.

Does anyone know the reason?

Thank you.

Hi Matsue,

there doesn't seem anything wrong with your expression.

One thing I can think of, is that there is some hidden special character in there somewhere, and outsystems can't deal with that.  It would explain why it says '' element, if it is a non-printing character.

This would typically be the case if you copied the expression from somewhere else (a pdf opened in some versions of browsers)  Can you throw away the whole assign, add a new one, and type the whole expression by hand ?


That's it! I retyped the expression again and the problem solved! I believe there were some invisible characters in the expression but still don't know what.

Thank you so much Dorine!




You see the scrollbar on the right?

It tells you there are multiple lines more than visible on the screen, scroll down and you will see the characters that cause the error.




Seems correct ! Along with above solutions, double check the data type of the parameters passed. Sometimes the behaviour is weird and after couple of trials it works out.

Try choosing the function directly from the scope window rather then writing your own or copying it.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.