Video Screencast Help

Parent / Child control on multiple dropboxes with database queries ?

Created: 14 May 2013 | 6 comments
bkcbkc11's picture

Hi All

Im planning to build a server deployment workflow, where I need six dropdown boxes to dependent on each other.

When the user select item in dropdown box 1, dropdown 2 is populated with data from database

The same is going to happen for the other dropdownboxes sequentially.

Has anyone a solution how to, when data is in database and not static, like a similar video on connect.

Hints or solution are very appriciated.

BR bkcbkc11

 

Operating Systems:

Comments 6 CommentsJump to latest comment

John Atkins's picture

bump.

 

I too need something like this.

John Atkins
Advanced Client Services Engineer
LifeWay Christian Resources
http://www.lifeway.com

TN User Group Membership Director
 

DannyTW's picture

I don't have a video or a how to article reference handy for this, but you could try setting your dropdowns on an Ajax panel (make sure to set the drop downs to post on change), then in the 2nd drop down (and 3rd, 4th, etc), box, set your "Items" source as a Dynamic Model and inside that model execute a component that pulls from the database depending on what the value in the first box is. After that component, just map the resulting data set to the end component.

You could also pre-query the database for all of the data from the different tables you would be reading from, then, inside that same Dynamic Model in the "Item" source of the 2nd (and 3rd and 4th) drop downs, just map the dataset you want into the end component for that dynamic model.

Rob Moore's picture

The way to do this is with an Ajax panel. Set each item to Post form on value change, and in the next drop down use the "This Form Data" variable group to select the previous dropbox value.

 

I use this method all the time to construct category drop down lists. I don't like loading the entire structure as that's sometimes a lot of data to hold in memory.

 

rob

Fernando Ruiz Caro's picture

Hello folks, this is exactly that i need too :-)

Thanks Rob for you response, can you "lend" us an example for view?

Regards

 

 

Rob Moore's picture

Here is a demo package for you to look at. Obviously I can't use a real database example since you won't have the same db as me, but the concept is the same, just use a DB component instead of the Matches rule. I like to use stored procedures instead of the standard DB query comps, but either one will work.

 

If you want to see it live, send me an email and we'll set up a GoToMeeting (I have an account), glad to show you.

 

rob

 

 

AttachmentSize
WebFormsProject1.package 120.96 KB
Fernando Ruiz Caro's picture

Great !! Thank you very much Rob !!

I'm sure it will be very useful for me.

I'll give you feedback shortly.

Thanks ;-)