Avatar

Level 1

Can anyone check if this syntax is correct. I am using this on ADD button to make subforms visible: First subform is always visible and from 2 to 6 it has to be visible when the user clicks ADD button.

if (this.resolveNode("PRI_DES2").presence == "hidden"){

this.resolveNode("PRI_DES2").presence = "visible";

this.resolveNode("PRI_DES2.PRI_FLAG2").rawValue = "X";

}

else if (this.resolveNode("Pri_Des3").presence == "hidden")

{

this.resolveNode("Pri_Des3").presence = "visible";

this.resolveNode("PRI_DES3.PRI_FLAG3").rawValue = "X";

}

else if (this.resolveNode("Pri_Des4").presence == "hidden"){

this.resolveNode("Pri_Des4").presence = "visible";

this.resolveNode("PRI_DES4.PRI_FLAG4").rawValue = "X";

}

else if (this.resolveNode("Pri_Des5").presence == "hidden"){

this.resolveNode("Pri_Des5").presence = "visible";

this.resolveNode("PRI_DES5.PRI_FLAG5").rawValue = "X";

}

else if (this.resolveNode("Pri_Des6").presence == "hidden"){

this.resolveNode("Pri_Des6").presence = "visible";

this.resolveNode("PRI_DES6.PRI_FLAG6").rawValue = "X";

}

Thanks,

Raj