Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Problem with drop down list

lpianwi
Level 4
Level 4

 

Good afternoon all,

I am having problem with the following code. I have 3 items in a drop down list, which should only allows custom entry if only "other" which is the item values of 3 is selected from the drop down. The code works okay for every other  items, and will clear the drop down list, but does not allow the user to enter/type in other values. I need it to allow the user to be able to enter other value if item 3 is selected.

Please I need help with the code below,

On Exit event;

 

if (DropDownList1.rawValue=="1"){

DropDownList1.rawValue="g";

}

else if (DropDownList1.rawValue="2"){

    DropDownList1.rawValue="p"

}

else if (DropDownList1.rawValue=="3"){

   DropDownList1.rawValue=null;

  xfa.host.setFocus(DropDownList1);

}

Thanks

v/r

Tammy

2 Replies
whyisthisme
Level 7
Level 7

try this:

if (DropDownList1.rawValue==1){

DropDownList1.rawValue="g";

}

else if (DropDownList1.rawValue==2){

    DropDownList1.rawValue="p";

}

else if (DropDownList1.rawValue==3){

   DropDownList1.rawValue="";

   DropDownList1.resolveNode("ui.#choiceList").textEntry = "1";

  xfa.host.setFocus("DropDownList1");

}