Two switches in the one field

A

Anthony Dowd

Hi

How do I include a second switch in a field that already contains a switch?

I want to create a field switch which controls the number of digits on the
right hand side of the decimal point and which also suppresses zero dollar
values

I know the following switch works to control the number of digits on the
right hand side of the decimal point...

{MERGEFIELD "item_No1"\#"$0.00;($0.00)"}

....but when I add a second switch (i.e., \#"$0.00;;") to the above field to
give the following field...

{MERGEFIELD "item_No1"\#"$0.00;($0.00)" \#"$0.00;;"}

....I get the following error:

"Error! Too many picture switches defined."

Any suggestions would be greatly appreciated.

Thanks
Anthony
 
S

Stefan Blom

If you don't want the number zero to be displayed, use # instead of 0
before the decimal point (in the field code):

{ MERGEFIELD "item_No1" \# "$#.00;($#.00)" }
 
A

Anthony Dowd

Hi Stefan

First of all thanks for your response and I apologise for not making myself
clear.

If there is a zero value in the field I want to leave the field completely
blank. Any suggestions?

Thanks
Anthony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top