Cascading Drop Downs in SharePoint using InfoPath

Standard

There are at times when you want to design a form where few fields are drop down type and the data is being populated from some other lists. For these reasons we need to make a relationship between the List Columns. Lets take the Classical example of Continent, Country and City. And you need to fill a form of a person with these 3 column details.

  1. Make 3 Custom Lists
    • Continent
    • Country
    • City
  1. Make 1 Column in each list as
    • Continent Column in Continent List – Type being – Single Line of Text
    • Country Column in Country List – Type being – Single Line of Text
    • City Column in City List – Type being- Single Line of Text
  1. Now, in the Country List, add the “Continent” Column as Lookup Column from the “ Continent” List as below:

001

  1. Now, in the City List, add the “Country” Column as Lookup Column from the “Country” List like we did in Point # 2.
  1. Now, make a 4th List as “Form”, and add Person Column in that Form List. Add the Columns in the List “ Form” as below:
  • Continent from Continent List
  • Country from Country List
  • City from City List
  1. Now, in the List “ Form”. Click the “ Customize the Form” so that when a new item is added, we can have the relationship between Continents, Country and City.
  2. The Form will open in InfoPath.
  3. In the InfoPath Form, see the “Data” tab and click on the “ From SharePoint List” as below

002

  1. Click Next
  1. In the Data Connection Wizard window, pick your List. Pick List “ Country” now and click Next
  1. Check Mark the Column “ Country” and “ Continent” and click Next
  1. Click Next
  1. Give it a meaningful name “Continent DC” and click Finish. This is your first Data Connection.
  1. Now see the InfoPath form and the fields and Right Click on the “Country” field in the InfoPath Form. Now Click “ Drop Down Text Properties” as below.

003

  1. Add the Data Source “Continent DC”, and Click the X Path beside the Entries Field. As mentioned below.

004

  1. Locate the d:SharePointListItem_RW after you click the X Path “. Add the “Country” Field and click Ok

005

  1. In the Value Field, click the X Path and Put ID. As you can see above
  1. In the Display Name Field, click the X Path and Put “ Country” as the Display Name. As you can see above Point 17. Press Ok and again Ok.
  1. Now you have the relationship intact in the form field.
  1. Do the same for City Field. Run steps from 14 to 18
  1. Editing the form in InfoPath is easy and I have shared the snapshot to guide you through. If in case you need more information, just drop me a message and I will respond within 24 Hours.
  1. Save and Publish the form
  1. Now your form is complete and the columns are inter linked in your Form List.
  1. By adding a new Item in the List “ Form” you can see the relationships between the 3 Columns -> Continent, Country and City
  1. The End
Advertisements

5 thoughts on “Cascading Drop Downs in SharePoint using InfoPath

  1. Fiona

    Hi There, thanks for your fantastic instructions, as the cascading dropdown has been eluding me for some time! I have followed your instructions to the “T” but it’s still not working. I’m using Sharepoint Online if that makes a difference.
    I’m having a problem with point 16. If for Entries I choose “country” (or in my case, “state”), the Value and Display buttons then only give me the option for “state”. Unless I enter Entries = d:SharePointListItem_RW , then it reveals the columns required. However, after publishing my form, the cascade is not working.
    Do you know what I could be doing wrong?
    Thanks, Fiona

    Like

    • Hi Fiona, can you check your Data Connections and Data Sources. For example in InfoPath form, the “Continent” data source should be equal to the “Continent” field in the Country List, which means that on “Country” Column in the Form List you would need to deploy a filter. The filter will have the condition that Continent Column in Form List is equal to the Continent Column in the Country List. In this way, it will pick the Country or States name. I am trying to get some snapshot for you on this 🙂

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s