Problem with listbox

Avatar

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
lpianwi
Level 2

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

Avatar

Avatar
Validate 1
Level 5
whyisthisme
Level 5

Likes

41 likes

Total Posts

324 posts

Correct reply

59 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 5
whyisthisme
Level 5

Likes

41 likes

Total Posts

324 posts

Correct reply

59 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
whyisthisme
Level 5

12-06-2013

try putting the code into the exit event of the listbox

Avatar

Avatar
Validate 1
Level 2
GeneveveX
Level 2

Likes

6 likes

Total Posts

60 posts

Correct reply

5 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 5
View profile

Avatar
Validate 1
Level 2
GeneveveX
Level 2

Likes

6 likes

Total Posts

60 posts

Correct reply

5 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 5
View profile
GeneveveX
Level 2

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.

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
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.