ReferenceError: Invalid left-hand side expression in postfix operation

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
Hi,

I started seeing this error often , and upon looking into it, it looks like a problem with formula handling negative numbers

Let's say i have 2 field i want to add up

Field A value = 1000
Field B value = -28

And i have a formula {{fieldA}} - {{fieldB}}, it will return this error as Field B is a negative

My problem is those field would contain 95% positive values, but in some cases , as intended, the number would be negative

In the example above i would expect the result to be 1028

Is there any way around that error, or a way to hide this error message for this case only?

Thx
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Dave,

Try putting {{fieldA}} - ({{fieldB}}) and see if that gets rid of the error message.

Thanks!
Amy
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
Thank you Amy, that worked!