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

Drop Down List Function Statement needed

Avatar

09-10-2008

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

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

09-10-2008

Will there only be one selection made?

Avatar

Avatar
Boost 1
Level 2
Luigi_247_365
Level 2

Likes

2 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
Luigi_247_365
Level 2

Likes

2 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Luigi_247_365
Level 2

09-10-2008

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...?

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

09-10-2008

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.

Avatar

09-10-2008

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. 🙂