Skip to main content
Participant
October 11, 2018
Question

Javascript not calculating properly

  • October 11, 2018
  • 2 replies
  • 485 views

I am new to javascript. I have a PDF form that adds all the total services [TOTAL SERVICES COSTS]. The next field is TOTAL SERVICES COST 2, where I have used a javascript to deduct 10% for pre pay. It is in the custom calculation field and reads [event.value = Number(this.getField("Total Services Costs").valueAsString) * 0.9]. It is not calculating correctly. Any help is appreciated.

This topic has been closed for replies.

2 replies

Participant
October 11, 2018

It doesn't compute at all sometimes, sometimes it returns the wrong answer. Is there anyway to share a file?

Bernd Alheit
Community Expert
Community Expert
October 11, 2018

Check the field calculation order.

Bernd Alheit
Community Expert
Community Expert
October 11, 2018

What is wrong?