If you're seeing the error:

INVALID_PROPERTY_VALUE
A numerical value is expected to follow the negative sign.

Here’s the quick fix:
Ensure a valid number follows the minus (-) sign in your expression.
The expression in your If condition must not include misplaced operators or incomplete syntax.

What's Going Wrong?

In this payload:

{
  "type": "If",
  "condition": "${data.val} ) -a",
  "then": [...]
}

There are multiple issues:

  1. ${data.val} ) has a mismatched closing parenthesis.

  2. -a is not a valid number or operand. The minus sign expects a number like -5 or a proper subtraction expression like ${data.val} - 2.

How to Fix It

Clean up the expression to make it syntactically valid. Here's a corrected version assuming you want to check if data.val is greater than -1:

{
  "type": "If",
  "condition": "${data.val} > -1",
  "then": [...]
}

Or if you're comparing against another variable:

{
  "type": "If",
  "condition": "${data.val} - ${data.anotherVal} > 0",
  "then": [...]
}

Developer Tips

  • Always wrap dynamic values with ${...}.

  • Every operator (+, -, >, etc.) must have valid operands on both sides.

  • Watch for extra parentheses or misplaced characters—these are common sources of parsing errors.

  • Use tools or formatters to spot broken expressions early.

TL;DR

The minus sign must be followed by a valid number or a complete subtraction.
-a: Invalid
-1, ${data.val} - 2: Valid