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

Adding to value

Community Beginner ,
Nov 04, 2020 Nov 04, 2020

Hi, I need help.
I have document level script that populates fields depending on dropdown field items, that part is working fine.
What I need is one of the fields is called "Weight" it is populated with numbers but lets say I have another dropdown that will populate same field but
this time I want value to add up to previous value. How would I do that?

TOPICS
Acrobat SDK and JavaScript
480
Translate
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

correct answers 1 Correct answer

Community Expert , Nov 04, 2020 Nov 04, 2020

In your document script where you use "Weight" field try change like this:

this.getField("Weight").value += Number(rest of your code goes here);

Translate
Community Expert ,
Nov 04, 2020 Nov 04, 2020
LATEST

In your document script where you use "Weight" field try change like this:

this.getField("Weight").value += Number(rest of your code goes here);

Translate
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