Skip to main content
Known Participant
November 4, 2020
Answered

Adding to value

  • November 4, 2020
  • 1 reply
  • 566 views

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 has been closed for replies.
Correct answer Nesa Nurani

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
November 4, 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);