Skip to main content
Known Participant
Nov 4, 2020 7:09 PM UTC
Answered

Adding to value

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?

This topic is closed to new replies. Start a new post to keep the conversation going.
Nesa Nurani
Nesa NuraniCorrect answer
Community Expert
Nov 4, 2020 8:33 PM UTC

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

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

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
Nov 4, 2020 8:33 PM UTC

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