• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Having difficulty with proper calculation script

New Here ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

Have successfully created a form that will add the prices for the gross order total, then the next line calculates the taxes,in which the net total is the sum of the gross order total and taxes. I am now needing to get the amount due, which is the net total minus a variable for a credit ($0-$75). I am not creating the proper calculation script. Can anyone assist?  I am very new to this but here is what I currently have that is not working:

var d = this.getField("Net Total");

var s = this.getField("GCU Adjustment");

event.value = d.value - s.value

TOPICS
Edit and convert PDFs

Views

282

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

The code looks fine. What exactly is not working correctly?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

It ill not populate anything.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

* Will not

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

Are you getting any errors on the JavaScript console? You can use Ctrl-J or Cmd-J to show the console window.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

I am receiving multiple errors : s is null; f is null; vars is not defined and also vard is not defined.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

Assuming everything else is correct, this would suggest that there are no fields with these two names in your form. Make sure that you spell the names exactly as they are spelled in the field properties.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

LATEST

Thank you Karl. I went through and corrected the spelling in all of them and it works now. I feel a little silly not seeing that on my own but that you for being so kind and for your assistance! Be well.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines