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

Drop Down List Function Statement needed

Not applicable
Hello People,



Happy Thursday for Starters. Its Almost Friday. 🙂



I have a drop down list, I would like to have a different subform populate with each value on the subform. example



1 = Bob Subform

2 = Holly Subform

And so on.



I have 22 values in the list and each need to populate a different subform. can Someone help me out real fast? I'd like to clean this up for the long weekend.



Thanks a bunch
5 Replies
pguerett
Level 10
Level 10
Will there only be one selection made?
Luigi_247_365
Level 2
Level 2
Not sure I understand 100%:

"I have a drop down list, I would like to have a different subform populate with each value on the subform. "



but... the quickest, not most efficient way, is:



In the exit or change event of your drop down box



xfa.form.FORM1.dropDownList::exit - (JavaScript, client)



if (this.rawValue == "1")

{

xfa.form.FORM1.Subform1. ... = "what ever";

}

if (this.rawValue == "2")

{

xfa.form.FORM1.Subform2. ... = "what ever2";

}



hope this helps...?
pguerett
Level 10
Level 10
You will have to create all 22 subforms that could possibly be displayed. Mark them all as hidden. Then when the user makes a selection in the drop down, on the exit event of your dropdown your code woudl look something like this:



xfa.resolveNode("xfa.form.form1.Page1." + DropDown.rawValue (appropriate subform name)".presence = "visible"



Make sure you set up your form as a fowed form. If the user decides to select a different name after the 1st one is displayed, then you can hide any subforms that are showing or simply make the appropriate subform visiable as well. It will be added after the last one.
Not applicable
Worked out well, Thank you very much for helping me out so fast, Please enjoy the long weekend and Holiday. I'm sure we will chat again. 🙂