Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

FORMULAS - NEGATIVE RESULT

Avatar

Level 4

Working with formulas, if the amount is negative I would like it to automatically show the amount as (-20) rather than just -20.  Can you please advise me what I need to do.

Regards

Jenny

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Jen,

The display pattern you need is num{(szzzz)}

The "s" is the symbol to display the minus sign.  Any symbols that don't have a special meaning are displayed as themselves (like the "-").

The complete list is defined in http://partners.adobe.com/public/developer/en/xml/picture_clause_2.0.pdf

Regards

Bruce

View solution in original post

4 Replies

Avatar

Level 6

Hi,

You can do it with script:

$.rawValue = concat("(" , NumericField1.rawValue , ")"), field which shows this value should be TextField.

Also you can use patterns, for youre case use num{( -zzzz)}.

BR,

Paul Butenko

Avatar

Level 4

I tried the pattern but that didn't work.  If the formula resulted in a negative number i.e. -88 it gave me (-88) but if the formula resulted in a positive number i.e. 88 it would still give me -88. 

Jen

Avatar

Correct answer by
Level 10

Hi Jen,

The display pattern you need is num{(szzzz)}

The "s" is the symbol to display the minus sign.  Any symbols that don't have a special meaning are displayed as themselves (like the "-").

The complete list is defined in http://partners.adobe.com/public/developer/en/xml/picture_clause_2.0.pdf

Regards

Bruce