Highlighted

Adding to value

Community Beginner ,
Nov 04, 2020

Copy link to clipboard

Copied

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?

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

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

TOPICS
Acrobat SDK and JavaScript

Views

23

Likes

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

Adding to value

Community Beginner ,
Nov 04, 2020

Copy link to clipboard

Copied

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?

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

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

TOPICS
Acrobat SDK and JavaScript

Views

24

Likes

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
Nov 04, 2020 0
Engaged ,
Nov 04, 2020

Copy link to clipboard

Copied

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

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

Likes

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
Reply
Loading...
Nov 04, 2020 0