SharePoint: How to Create Multiple Cascade Drop Downs Using InfoPath 2010

Today, I will walk you through the steps to create an AV Asset form using InfoPath 2010 with multiple cascading drop downs. The form will contain the following information:

InfoPath 2010 AV Asset Form

In this AV form Equipment Type, Manufacturer and Model number are interdependent lists. If a user picks equipment type from equipment combo box, the list of manufacturers’ combo box should only show manufacturers which are related to this equipment type.

For Example when we the select equipment type Analogue Project, It will only show the manufacturers Kodak, Elmo, Simda and Sennhesiter.

SharePoint 2010 Equipment List

At next level when users select Manufacturer name then the Model list will show only the model number related to the selected Manufacturer and Equipment type.

For Example, a user selects Equipment Type=” Analogue Project” and Manufacturer = “Kodak” then only the model number, related to this equipment type and Manufacturer, will appear in Model list.

SharePoint 2010 Model List

Let’s start to implement our scenario.

Step 1:

Create custom Equipment Type List in SharePoint. This will look like the following list.

SharePoint Equipment List

Step 2:

Create a custom Manufacturer List in SharePoint. In this list we will use an equipment list as a look up field. When a user enters a manufacturer name, he must pick an equipment type. Basically in this list we are storing the relationship between manufacturer and equipment type.

SharePoint Manufacturer list

Our Manufacturer list will look like this.

Manufacturer list view

Step 3:

Create a custom Model List in SharePoint. This is where we will store model numbers against equipment type and manufacturer name.

In this list there are two lookup fields, one for equipment type and another for manufacturer’s name. We have also implemented a cascading drop down condition based on equipment type. E.g. when a user picks equipment type, the manufacturer list will be automatically filtered based on selected equipment type.

SharePoint 2010 Model list

To implement cascading, select list and click on List Tools in the bread crumb menu then click on the Customize Form with InfoPath icon button.

SP 2010 list bread crumb

In InfoPath the form will look like this: When we open the form in InfoPath there is already a default data connection created. But we need to create an extra secondary data connection for the manufacturer combo box, so we can bring in the equipment type field which we need to apply a filter to.

SP 2010 Model list design

Step 3.1

Create a secondary data connection. Click on Data Menu, Data Connections and Add Data Connection to receive data from a SharePoint list or library then chose the manufacturer list which we created earlier and select the following fields.

InfoPath data connection wizard

Finish and close this wizard.

Step 3.2

Click on Drop Down List Properties of the Manufacturer combo box and change the data source to the newly created data connection.

InfoPath combo box properties

Click on select X Path button next to the entries box.

X Path entries

Click on the Filter Data button and then on the Add button to specify filter conditions. The hierarchy of opened windows will look like this.

SP 2010 Drop Down List Box filters

In the Specify Filter Condition form we are specifying conditions based on the equipment type field which is in the Manufacturer DS (which is our secondary data source that we created earlier) is equal to the equipment type field in our main data connection. This is the selected equipment type combo box’s value on this form:

InfoPath list design

Save your changes and publish your changes to SharePoint. Now you can see that the cascade drop down condition is implemented on the Model list.

Model list after publish

Step 4:

Create an AV Asset form in InfoPath 2010.

InfoPath Asset Form

Here we are going to implement a cascading condition on the Manufacturer and Model combo box, whose values will depend on the equipment type combo box.

Step 4.1

We need to create three data connections to receive data from our SharePoint lists. This data connection will receive data from

  1. Equipment Type List (This will be the data source of the equipment data type combo box)
  2. Manufacturer List (This will be the data source of the Manufacturer combo box)
  3. Model List (This will be the data source of the Model combo box)

Our three data connections will look like this:

Data connections

Step 4.2

Change the data source of the equipment type Combo Box:

Right click on the equipment type combo box and click on Combo Box Properties.

Equipment Combo Box Properties

The Combo Box Properties windows will open, from the list box choices section we need to select get choices from an external data source.

Equipment Data Connection

The Data Source Combo Box will be enabled. From the drop down combo box select the data connection which we created for equipment type SharePoint list.

Step 4.3

Using steps mentioned in step 4.2 change the data source for the Manufacturer combo box

Step 4.4

Using steps mentioned in step 4.2 change the data source for the Model combo box.

Now click on the preview button and verify all three combo boxes are displaying the right values from your SharePoint list.

Combo box with filters

Step 5

Implement cascading filters, so when we select equipment type we can see all relevant manufacturers of select equipment types and when values of equipment type and manufacturer are selected, the model combo box should show only relevant model numbers.

Step 5.1

Click on the properties of the Manufacturer combo box and click on select X Path button next to the entries box.

X Path entries

Click on the filter data button and click on Add button to specify filter conditions. The hierarchy of opened windows will look like this.

Combo Manufacturer Filter

In the filter data box we have mentioned a filter condition. Select only those records where equipment type in the manufacturer data source is equal to the equipment type selected from the equipment combo box in our form.

Now when we select the equipment type value from the combo box, it will only show relevant manufacturer names in the manufacturer combo box.

Equipment values

Step 5.2

To implement a cascading filter condition on the Model combo box we need to follow the same steps mentioned in step 5.1, apart from filter condition. In this case our filter condition will be like this:

Specify filter conditions

Here we are selecting all model numbers from the model source data connection where equipment type in the model data source is equal to the equipment type selected on the form and Manufacturer name in the model data source connection is equal to manufacturer name selected on the form.

Note: Model data source is a SharePoint List which contains all the information about models, equipment types and manufacturers.

SharePoint 2010 Model List

After applying above mentioned filter conditions, the Model combo box will show only relevant model number related to equipment type and manufacturer.

Final list

Step 6:

Save changes and publish form to the SharePoint document library.