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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Drop down value displays in another text field

mdawn50
Level 7
Level 7

Hello - I found this script in the Forum, but I'm not able to get it

to work. I have the script in the change event of the drop down field. Whatever is chosen in the ddl, should then appear in TextField12. The ddl works fine, but the value selected is not displaying in the text field on page 4.

if

(xfa.event.fullText == "Supervisor")

{

page4.pcEquip.dirAbove.TextField12.rawValue

= "Supervisor";

}

if

(xfa.event.fullText == "Manager")

{

page4.pcEquip.dirAbove.TextField12.rawValue

= "Manager";

}

if

(xfa.event.fullText == "Director")

{

page4.pcEquip.dirAbove.TextField12.rawValue

= "Director";

}

if

(xfa.event.fullText == "VP")

{

page4.pcEquip.dirAbove.TextField12.rawValue

= "VP";

}

else

{

page4.pcEquip.dirAbove.TextField12.rawValue

= null;

}

Any help is appreciated.

Thanks,

MDawn

1 Accepted Solution
Varma_LC
Correct answer by
Level 6
Level 6

I would use generic code like follwing.....in change event of DD...

if

(xfa.event.change != "Please Select") { //when any thing other than 'Please Select'

     page4.pcEquip.dirAbove.TextField12.rawValue

= xfa.event.change; //assign current selected value to text field.

}

else { //when 'Please Select'

     page4.pcEquip.dirAbove.TextField12.rawValue

= ""; //clear the TextField value

}

Good luck

View solution in original post

2 Replies
Varma_LC
Correct answer by
Level 6
Level 6

I would use generic code like follwing.....in change event of DD...

if

(xfa.event.change != "Please Select") { //when any thing other than 'Please Select'

     page4.pcEquip.dirAbove.TextField12.rawValue

= xfa.event.change; //assign current selected value to text field.

}

else { //when 'Please Select'

     page4.pcEquip.dirAbove.TextField12.rawValue

= ""; //clear the TextField value

}

Good luck

View solution in original post