InfoPath 2007 Cascading Drop Down

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi this is Laura Rogers and one of the most frequently asked questions that SC and SharePoint is how do you do a cascading drop-down box now what is a cascading drop-down box well it is when you would like to have a drop-down box in your form where people can select an item in the first drop-down box which will affect what appears in the next drop-down box and this cascades on down to however many levels like for example you could pick a country and then when you pick a country that would narrow it down to the states in that country and then once you pick a state then your next drop-down box might be limited just the cities in that state so that's the kind of thing that a drop-down a cascading drop-down box will do now there isn't just an out-of-the-box way to do that in SharePoint but there is an out-of-the-box way to do that in InfoPath so I'm going to show you an InfoPath 2007 how to easily create a cascading drop-down box now we're using a SharePoint list so initially we've created this SharePoint lists called locations and this is going to be the basis for our cascading drop-down box so we have three fields in this list called locations main region state and branch so we have basically Midwest northeast south east and west are our regions and then within each of these regions you're gonna have some states and then we have some branch numbers so it should be like you're you know just your branch offices and the branch offices in this example are just numbered so what you want to do is create a form that lets you pick a region and then once you've picked a region it then filters the state box by only states within that region so let's do that in InfoPath 2007 okay here's InfoPath and i've created just a simple blank form and I've typed in region state and branch number and I have places to put these fields so I'm gonna go and design tasks and go to controls I'm going to pick drop-down list box for each of these so I'm just dragging drop-down list box and then once I've just as a general good practice and InfoPath once I've created these fields I want to go ahead and name them quickly branch ok so now they're named correctly and when I go into design tasks and go to data source I can see that I have now the five fields in my form now each when I select an item in the drop-down box whatever I select is going to be stored in these InfoPath fields and then once the form is submitted then this you know the fields that information is stored and then it's submitted up to info up to SharePoint if that's what you choose we're not going to go into the whole form submission thing we're just I'm just going to show you how to do the cascading drop-down boxes in this demo so I've created these drop-down boxes the next thing to do is to create a data connection that will grab that information from SharePoint now I'm not writing back I'm not writing anything back to this SharePoint list I'm just receiving information from it as a reference so creating to cut a new connection to receive data and then I want to see it from a shipment library or list and this is where I have to put the URL to my site so my site is this just paste it in there and it will look it up now InfoPath is showing me a list of all of the lists and libraries on that site and the one that I need in this example is called the patient's so I need these three fields region state and branch so when I receive data from that SharePoint list I'm receiving those three fields so you can be selective about which fields you get and then this offers me and you know an option just store the data in the form template that's up to you and then this one lets you name a static connection and allow to retrieve the data right when the form is open in this example I'll just allow that and now I have a new data connection called locations so for each of these three drop-down boxes I'm going to be using the data from that location so I'm going to be picking data from that list but once I've selected it in the SharePoint in the info path drop-down box it's then stored in that form in these fields that we've defined so I double clicked on region and now I want to look up values from an external data source the only data source I've defined as location so there it is and then within locations I want for this one I want to pick the region and show only in entries with unique display names is important to check because if I have let's go back over and look at my list I have multiple items for each of these regions so I want it I only want to show unique ones so that I don't see you know 15 or 20 different items in the list I only see one Midwest one northeast one example you know that kind of thing okay so click OK and now I'm gonna move on to state real quick now this is where it starts getting a little trickier because I'm not only going to pick the state but I'm going to filter the data and that is the key behind the cascading drop-down so I click on state then I want to filter the data so I want to say region which is the one above it is equal to and then since the user has already clicked on region and selected a region it's going to be stored in not this not this locations data source but the main data source it's already going to be stored in this region so let me show you what that's going to look like so if they picked southeast for example in this first in the first drop-down box you're gonna see a filter of these states that exist in southeast so that's how the filters going to work okay so filter by region in the and one data source is equal to what's already stored in the second data source ok click OK I gotta make sure I don't I check the box to show only the entries with unique display needs because I don't want to see multiple listings in each state so the branch number I have to do the same thing pic branch here and then filter the data again so this time I'm going to say state which is the one right above branch is equal to the data that has been stored in the main form not in the secondary - or so the data that's already been stored in the State feel because the users already picked that state at that point click ok ok ok ok and then this one's probably already going to be unique but it doesn't matter if I check it on here save my form yes preview yes and now I'm gonna pick my region southeast and then look it's filtered down to show only the states in the southeast and now it's only showing those three branch numbers that I have in Alabama all done thank you
Info
Channel: Laura Rogers
Views: 2,249
Rating: 5 out of 5
Keywords: SharePoint, InfoPath, 2007, Cascading drop-down
Id: -ojDKl2oyVM
Channel Id: undefined
Length: 7min 46sec (466 seconds)
Published: Thu Apr 14 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.