Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculated Field, blank when zero

Status
Not open for further replies.

hceonetman

Technical User
Mar 16, 2001
92
US
I am creating electronic forms in Acrobat 5.0. One form is a purchase requisition, multiple lines include quantity and unit price entered by the user, and a calculated extended cost. I can't find any way to specify that the calculated field should be blank if zero. This really hurts the appearance of the final printed document, as there are 11 item lines available.

Anyone know if 'blank on zero' is possible?

Thanks in advance,
HCEONETMAN
<<Clever saying goes here>>
 
With this I tend to set the initial vlue of the field to &quot;&quot; then it only gets filled when the user presses the calculate button.

However you should be able to do a custom validation script along the line of :

if (this.value==&quot;0&quot;) this.value=&quot;&quot;

But I have not looked at this at all, it's just from the top of my head. Derren
[Mediocre talent - spread really thin]
 
Derren,
I tried using an if statement in a custom script but got an error msg. Also, I don't see a 'calculate' button. When users enter data in the qty and price field, the total cost field updates immediately. Seems there should be something in the format properties, but I can't find anything. I can't set the initial value to &quot;&quot; because it's a numeric field. If I change the field to text, I can't perform calculations. Or is there a way to customize and do calcs on a text field?

Thanks,
HCEONETMAN
<<Still can't think of anything clever>>
 
I just remembered, I hide the calculation field first.

The calculate button is a form button which I add to the PDF (not printing, visible) which shows the calculation field when it is pressed. Derren
[Mediocre talent - spread really thin]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top