
1. Re: Over ride a field formula if 0 is entered
Bernd Alheit Jun 28, 2017 12:33 AM (in response to Lisonali)The error is?

2. Re: Over ride a field formula if 0 is entered
gkaiseril Jun 28, 2017 12:38 PM (in response to Lisonali)We need to know the exact wording of the error being reported.
It looks like you have a field named "Net Amount". Does this field calculate correctly?
It might even be helpful if you can provide a link to a sample form with this error. We could then download the sample form and see the entire process. The error could be in a form field before your tax calculation.

3. Re: Over ride a field formula if 0 is entered
Lisonali Jun 28, 2017 5:59 PM (in response to gkaiseril)@gkaiseril
Sorry, I have attached the form via dropbox, it's not on our work server yet but I hope this works..
I have removed this formula
var nGST = this.getField("GST").value;
if( nGST > 0.0) event.value = nGST * 0.10;
And left the very basic formula in the total field. So now I don't get an error but the form won't allow me to put in a zero dollar value in the GST Field.
Here is the link to the form 
https://www.dropbox.com/l/scl/AAAct97stE0c5swmRI8mfmDDqV2vshp2WqY
thanks

4. Re: Over ride a field formula if 0 is entered
try67 Jun 29, 2017 1:20 AM (in response to Lisonali)You didn't specify in your code what should be the value if the GST field is blank or equals zero...

5. Re: Over ride a field formula if 0 is entered
JR_Boulay Jun 29, 2017 1:29 AM (in response to Lisonali)Sorry, I have attached the form via Dropbox
Acrobat : File menu : Send File : Send & Track : Create anonymous link

6. Re: Over ride a field formula if 0 is entered
Lisonali Jun 29, 2017 1:52 AM (in response to JR_Boulay)Thanks @JR_Boulay  now attached properly
https://files.acrobat.com/a/preview/6d1534a2da8d4ebdbdf56db3d12a4f80

7. Re: Over ride a field formula if 0 is entered
JR_Boulay Jun 29, 2017 2:18 AM (in response to Lisonali)It's not "properly", for a PDF form opened in Acrobat it's just quickly or easily.

8. Re: Over ride a field formula if 0 is entered
gkaiseril Jun 29, 2017 2:10 PM (in response to Lisonali)How does one know when to apply or not apply the GST?
There has to some trigger or value or description that could be used to determine if the GST needs to be computed or not.
Conditional execution and Acrobat JavaScript by Thom Parker

9. Re: Over ride a field formula if 0 is entered
Lisonali Jun 29, 2017 5:01 PM (in response to gkaiseril)not all goods and services have GST in Australia  it depends what it is.
I have printed out the Thom Parker article and will have a read through it too.

10. Re: Over ride a field formula if 0 is entered
gkaiseril Jun 30, 2017 2:23 PM (in response to Lisonali)The form has to have some way to determine if GST needs to be computed on an amount or not. The amount is not enough to determine if the calculation needs to made. There has to be another entry along with the amount so the script can determine if the calculation needs to be preformed or not. It could be simple check box to indicate that GST needs to be computed or a description of the item or type of item that can be used to determine if the GST needs to be computed or not. For the last I would use a drop down list that is prepopulated with categories or descriptions of what the amount represents and from that list a script could make a decision as to whether GST needs to be calculated or not.

11. Re: Over ride a field formula if 0 is entered
Lisonali Jul 6, 2017 4:48 PM (in response to gkaiseril)Thanks gkaiseril  I will give that a try. Sorry for the delayed response, working on other issues at the moment. going to give this a go today.