Skip to main content
Inspiring
February 13, 2024
Answered

How do I keep an entered value

  • February 13, 2024
  • 2 replies
  • 1263 views

The value I put in "No of UTs" changes when I change something about "Proj Length" or click one of the check boxes. I want the value I put in "No of UTs" to stay the same if I modify the "Proj Length" or click one of the check boxes. I also want the script in "Complexity" to recognize any changes to the form.

This topic has been closed for replies.
Correct answer Nesa Nurani

In the "Complexity" field script you use single equal sign = to compare, you need to use double equal signs ==, like this:

if((this.getField("Proj Length").value < 1) && (this.getField("No of UTs").value == 4))
{
event.value = 4;

Fix all the lines where you used one = for compare.

2 replies

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
February 13, 2024

In the "Complexity" field script you use single equal sign = to compare, you need to use double equal signs ==, like this:

if((this.getField("Proj Length").value < 1) && (this.getField("No of UTs").value == 4))
{
event.value = 4;

Fix all the lines where you used one = for compare.

Badhawg66Author
Inspiring
February 13, 2024

Thank you Nesa this fixed the problem! Your help with this project has been tremendous

try67
Community Expert
Community Expert
February 13, 2024

The calculation code for "Complexity" is overwriting the value you're entering due to errors in it. Did you create this form? If not, report it to the author.