Highlighted

Problem with listbox

lpianwi

11-06-2013

Good afternoon all,

I am having problem with the following code. I have 3 items in a listbox. This code should populate the drop down list depending on what is selected in the list box. It is however, not working. 

Please I need help with the code below,

On calculate event;

If(Listbox1.rawValue==1){

DropDownList1.rawValue="P";

}

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

    DropDownList1.rawValue="J" 

}

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

    DropDownList1.rawValue="H" 

}

else if (Listbox1.rawValue="4"){

   DropDownList1.rawValue=null;

  xfa.host.setFocus(DropDownList1);

}

Thanks

v/r

Tammy

Replies

Highlighted

GeneveveX

13-06-2013

I agree with whyisthisme. For some reason, putting code on the "change" event of a listbox doesn't seem to work. You have to put it under the exit event.

Highlighted

radzmar

MVP

13-06-2013

The reason it doesn't work is that the rawValue does not exist when the change event occurs.

The grab a value during the change event use "xfa.event.newText" instead.