I have a subform that is added through an instancemanager.addInstance method.
In this subform there are 2 dropdowns. Depending on what is selected in the first dropdown, the second dropdown would update with an appropriate value. For some reason only the LAST statement is being applied no matter the selection is made on the first dropdown.
This is what I have
if (this.resolveNode("subrow").ddlField.rawValue=1)
{
this.resolveNode("subrow").ddlECapField.rawValue=7
}
if (this.resolveNode("subrow").ddlField.rawValue=2)
{
this.resolveNode("subrow").ddlECapField.rawValue=4
}
if (this.resolveNode("subrow").ddlField.rawValue=3)
{
this.resolveNode("subrow").ddlECapField.rawValue=6
}
If I use "else if" instead of the "if" I only get the first value no matter what is selected.
Views
Replies
Total Likes
Hi Nick, You need to use "==" in the if statement for comparison, using one "=" will assign the value and then test for the result being zero (false) or non-zero (true), Regards Bruce
Views
Replies
Total Likes
Thank you, i knew it had to be something easy. I also found an alternative:
Switch(this.rawValue)
{
case "1":
this.resolvenote("ddlECapField").rawValue=7
break;
case "2":
this.resolvenote("ddlECapField").rawValue=4
break;
case "3":
this.resolvenote("ddlECapField").rawValue=6
break;
}
The one drawback it seems of this one is that it only seems to work on "exit" and doesnt work on "change"
Views
Replies
Total Likes
You can get it to work on the Change event by using the following:
switch(this.boundItem(xfa.event.newText));
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies