Skip to main content
harshj0001
October 9, 2023
Question

Should throw syntax error.

  • October 9, 2023
  • 1 reply
  • 0 views

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

November 14, 2023

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.