Copy link to clipboard
Copied
Hi, I'm new to JavaScript and now I have to write a calculation formula.
I have 4 different values to calculate together and get their VAT amount at the same time
=sum(text49, text52, text53, text54)*1.14
but this does not work.
I have tried working with the amount of columns and lines Col8 Ln10, Ln13, Ln14, Ln15
But its just not calculating my values.
Please HELP!!!!
Copy link to clipboard
Copied
Something like this:
(text49 + text52 + text53 + text54) * 1.14
Copy link to clipboard
Copied
Hi,
Thank you for the advice
I have tried this in the simplified field notations and in the custom calculations script, its still not doing the formula.
I typed it as you gave it to me, is there something else I must type in front of it to do the calculation?
Copy link to clipboard
Copied
press ctrl+j and look for any error message.
Copy link to clipboard
Copied
Thanks I will try that this afternoon and let you know how it went.
Copy link to clipboard
Copied
Hi this is the error it gives me,
But i changed my form, I calculate all amounts to a subtotal, and from there just get the 14% VAT.
I write a script in the Simplified Field Notation:
Sub/Total*0.14
It gave me a Vat amount on the 1st try round and then with the next test it stayed null.
I checked like you told me and this is what I got: (What does it mean, and better still what am I doing wrong)
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
TypeError: getField(...) is null
1:Field:Calculate
Copy link to clipboard
Copied
In the calculation you use a field name which not available in the form.
Copy link to clipboard
Copied
Hi everyone,
Thank you very much I have come right my problem is solved. than you so much for the help.
Copy link to clipboard
Copied
The Simplified field notation has a number of requirements for the field name like the name must start with an alphabetic character, the field name cannot use an arithmetic operator, like "+", "-", "*", and "/". The "/" is the division operator. The script behind the Simplified field notation parses the entry by white space, numbered values, alphabetic values, and arithmetic operators and then performs the calculation based on the parsed strings.
You should rename the field "Sub/Total" or insert the JavaScript Escape character before the "/".
Sub\/Total * 0.14
Using a Custom JavaScript calculation should also work.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now