These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Suppress Zero

jwongsf
Registered: Mar 25 2008
Posts: 2

Hi All, I am new to this and am starting to get my feet wet,.
I am using Acrobat 8 Pro, creating a field with calculation, However since there is no calucation it displays a 0.00 I have tried to inpurt the formula
if(eventnumber==0)evventnumber=""; in the validation section however this does nothing to the display,
In the calculations I have the Product = qty,rate (something to this effect)

what am I missing..

I would appreciate any assistance in this matter.
Thanks
James

My Product Information:
Acrobat Standard 8.1.2, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
You have to follow the syntax rules of JavaScript.

To test an event object's "value" property you use the "event.value", so you should be coding:

if (event.value == 0) event.value = '';To do the calculation you have 3 options for performing the computation and you chose one.

1. "The _____ of:"
2. The simplified field notation
3. "Custom calclulation script:"

For the first one you select the operation, "product", and the fields. And you will need to use the custom validation scirpt above because this option provides no entry for the test.

For the second method you just enter in the field names and operation but you can not enter any other control statements, functions, methods, etc. So you need to use the validation code.

For the last option you can do the whole thing:

event.value = this.getField("qty").value * this.getField("qty").value;
if (event.value == 0) event.value = '';

George Kaiser