Create Multiple Cascading Drop-down Lists in InfoPath:

Scenario is to create an AV Asset form, which will be containing following information.

infopath 2010 form

InfoPath 2010 AV Assest Form

In this AV form Equipment Type, Manufacturer and Model number are interdepending lists. If user picks up equipment type from equipment combo box, list of manufacturer combo box should only show manufacturer which are only related to this equipment type.

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

SharePoint 2010 Equipment List

SharePoint 2010 Equipment List

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

For Example

User selects Equipment Type=” Analogue Project” and Manufacturer = “Kodak” then only model number will appear in Model list related to this equipment type and Manufacturer.

SharePoint 2010 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 following list.

SharePoin  Equipment List

SharePoint Equipment List

Step 2:

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

SharePoint Manufacturer list

SharePoint Manufacturer list

Our Manufacturer list will look like this.

Manufacturer list view

Manufacturer list view

Step 3:

Create custom Model List in SharePoint. In this list we will store model number against equipment type and manufacturer name.

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

SharePoint 2010 Model list

SharePoint 2010 Model list

To implement cascading, select list click on List tools in bread crump menu then click on customises form with InfoPath icon button.

SP 2010 list bread crumb

SP 2010 list bread crumb

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

SP 2010 Model list design

SP 2010 Model list design

Step 3.1

Create secondary data connection. Click on data menu, click data connections and add data connection to receive data from SharePoint list or library then chose manufacturer list which we created earlier and select following fields.

InfoPath data connection wizard

InfoPath data connection wizard

Finish and close this wizard.

Step 3.2

Click on drop down list properties of Manufacturer combo box and change the data source to newly created data connection.

InfoPath combo box properties

InfoPath combo box properties

Click on select X Path button next to entries box.

xpath enteries

xpath entries

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

SP 2010 drop down list box filters

SP 2010 drop down list box filters

In specify filter condition form we are specifying condition on equipment type field which is in Manufacturer DS (which is our secondary data source which we create earlier) is equal to equipment type field in our main data connection. This is selected equipment type combo box’s value on this form:

InfoPath list design

InfoPath list design

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

Model list after publish

Model list after publish

Step 4:

Create AV Asset form in InfoPath 2010. This will look like this.

infopath 2010 form

infopath assest form

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

Step 4.1

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

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

Our three data connections will look like this:

Data connections

Data connections

Step 4.2

Change data source of equipment type Combo box:

Right click on Equipment Type combo box and click on combo box properties.

Equipment combo box properties

Equipment combo box properties

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

Equipment Data Connection

Equipment Data Connection

Data source combo box will enable, from drop down combo box select data connection which we created for equipment type SharePoint list.

Step 4.3

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

Step 4.4

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

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

Combo box with filters

Combo box with filters

Step 5

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

Step 5.1

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

xpath enteries

xpath entries

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

combo manufacturer filter

combo manufacturer filter

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

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

Equipment values

Equipment values

Step 5.2

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

Specify filter conditions

Specify filter conditions

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

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

SharePoint 2010 Model List

SharePoint 2010 Model List

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

Final list

Final list

Step 6:

Save changes and publish form to the SharePoint document library.

SharePoint Document Library

SharePoint Document Library

 

Be Sociable, Share!

Tags: , , ,

1 Comment on How to Create Multiple Cascade drop downs using InfoPath 2010

  1. Lucas says:

    Hi,
    I would like to know if it is possible to use this method to use cascade dropdown in document librarys. I don’t know how to customise the forms of a library using InfoPath

Leave a Reply


*