Difficulty putting parentheses around a negative number

I tried using this code to put parentheses around negative values of the variable lvTot5:

lvTot5 = ?(lvTot5<0,pattern(-lvTot5,"($#,)"), lvTot5>0,pattern(lvTot5,"$#,"),"")

but negative numbers lose the trailing parenthesis. I was forced to use this code:

lvTot5 = ?(lvTot5<0,pattern(-lvTot5,"($#,") + ")", lvTot5>0,pattern(lvTot5,"$#,"),"")

Can anybody replicate this problem?

Looks like a bug to me. I’ve added a bug report.

Also, off topic, but man to I hate the buggy new text editor in BitBucket.

I went to fix this bug and now I cannot duplicate it. It works fine for me on both my development version and on the official Panorama X 10.1.2 release. Not sure why I didn’t think it worked back in June.