DropDown Cascading in Infopath Form

Introduction

We sometimes encounter the requirement to work on 2 or 3 dropdownlists. The second dropdown should be populated on the basis the first dropdown and the third dropdown list on the second and so on.

In this article I will explain in details how to achieve the cascaded dropdown in Infopath from a SharePoint List.

The following is the step-by-step procedure.

  1. Create two lists in your SharePoint site. I have created two lists, Regions and Countries. Region is a lookup within Country.



  2. Select Microsoft Infopath Designer 2010 from Start and Microsoft Office.



  3. Select the Blank form from the templates.



  4. Design the form as below:



  5. Double-click the Region Dropdown List. Select Control Properties inside the Properties Tab.



  6. Select Get choice from an external data source and click Add.



  7. Select Receive Data.



  8. Select SharePoint library or list and click Next.



  9. Enter the URL of the site.



  10. Select Region List from the List.



  11. Check Id and Title.



  12. Name the data connection (leave it as the default).



  13. Click Finish, Apply and then OK.



  14. Repeat all the above processes for Country and bind Country.



  15. Create another connection Country.



  16. In the Entries section, click on the tree button to select XPath.



  17. In Select a Field or Group dialog, click on the Filter Data… button.



  18. In Filter Data click on the Add… button.
  19. In specify Filter Conditions, in the first drop-down list choose Select a field or group.
  20. Select a Field or Group opened. Select Country as the Data Source, choose Region in the dataFields then click OK.



  21. In specify Filter Conditions, in the last drop-down list choose Select a field or group.
  22. Select a Field or Group opened. Select Main as the Data Source then choose Region in the dataFields then click OK.



  23. Click on OK to close the specify Filter Conditions dialog.
  24. Click on OK to close the Filter Data dialog.
  25. Click on OK to close the Select a Field or Group.
  26. In the Drop Down List box properties, choose d:ID in the Value: section then click OK to close this.
  27. Publish the Infopath form to the SharePoint Form Library.
  28. The form will opened as below.




Conclusion

In this article I have explained how to create a cascade dropdownlist in Infopath.