Skip to main content
harshj0001
Inspiring
Oct 9, 2023 10:20 AM UTC
Question

Should throw syntax error.

Hi, not a problem but following code should throw some error, but it is evaluating.
Here a comma is missing, and we are using a local variable in its definition, which should throw an error.

Also, we can try various P&C.

/*Code 1*/
a!localVariables(local!data: 2 * 5tointeger(2 * local!data))
/*Code 2*/
a!localVariables(local!data: 2 * 5tostring(2 * local!data))
/*Code 3*/
a!localVariables(local!data: 2 * 5toboolean(2 * local!data))
/*Code 4*/
a!localVariables(local!data: 2 * 5date(2 * local!data))

1 reply

Known Participant
Nov 14, 2023 8:25 PM UTC

I've has instances like this. Appian is sometimes capable of running the expression but be careful because it doesn't always run as expected. In my situation, I discovered it in production when the code wasn't running as expected and the error wasn't shown in the expression rule.