Textfield value based on addinstance value

aka44356106

01-10-2019

if (this.parent.instanceManager.count = 1){

  this.rawValue = " Yellow";

} else{

this.rawValue = "Pink";

}

i use this script in a dynamic form

but always same value appeared in all new addinstance

plz help whats wrong in script.

Accepted Solutions (0)

Answers (1)

Answers (1)

radzmar

MVP

02-10-2019

Your comparison operator is wrong. It has to be either == or === but not =.

Try this.

if (this.parent.instanceManager.count == 1){

  this.rawValue = " Yellow";

} else{

this.rawValue = "Pink";

}