Cascading drop-down lists with a repeating table using SharePoint lists
This InfoPath demo video shows you how you can use two linked SharePoint lists and two normal SharePoint lists to connect two drop-down list boxes and one repeating table in a dependent manner for a cascading effect.
This InfoPath video is a demonstration of an InfoPath form that extends recipe 63 of InfoPath 2010 Cookbook 2 to display cascading drop-down list boxes that have a repeating table in the cascading sequence and that connect to four SharePoint lists including linked SharePoint lists.
If you are using InfoPath 2013 with SharePoint 2013, recipe 66 of InfoPath 2013 Cookbook 2 outlines steps for creating a solution similar to the one displayed in the video below.
InfoPath 2010 video transcript:
In recipe 62 and 63 of InfoPath 2010 Cookbook 2, I already explained two basic methods you can use to create cascading drop-down list boxes that connect to SharePoint lists.
This solution that I'm about to demonstrate makes use of the method described in recipe 63 by extending it to display drop-down list boxes that have a repeating table in the cascading sequence.
So here I'm in SharePoint 2010 where I've got this ShoeBrands SharePoint list. This list serves as a base list to this RunningShoes SharePoint list. So as you can see, it is linked to the ShoeBrands SharePoint list through this column. This list is also linked to this ShoeTypes SharePoint list in which types of running shoes are stored. And finally, the ShoeBrands and the ShoeTypes SharePoint lists are connected, linked to each other, through this ShoeBrandTypes SharePoint list.
The basic idea is that I want to display these shoe brands in a drop-down list box. Then in a second drop-down list box, I want to display the shoe types that correspond to the selected brand in the first drop-down list box. And then finally, I want to display the running shoes that are corresponding to the selected brand and type in the drop-down list boxes, in a repeating table.
So I've already published an InfoPath form template to this SharePoint form library. So if I add a new form, you'll see that as soon as the InfoPath form opens, it displays the list of shoe brands in this drop-down list box. Currently this Shoe Type drop-down list box is still empty and so is the repeating table.
If I select a shoe brand from the first drop-down list box, the corresponding shoe types will be displayed in the second drop-down list box, and when I select a shoe type from the second drop-down list box, you'll see that the running shoes will be displayed in the repeating table. If I select Control, you'll see that a different running shoe will be displayed.
I can select a different brand and a shoe type again. Then you'll see one running shoe appear there. And then if I select a different type, you'll see three running shoes appear.
There is also a trick that I implement in this InfoPath form to clear the repeating table. So if I were to clear this drop-down list box, you'll see that no items will be displayed in the repeating table. And the same thing goes for if I were to clear this drop-down list box, both the drop-down list box for the shoe type and the repeating table would be cleared.
See more InfoPath 2010 tutorial videos »
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.
Related InfoPath Articles:
- Cascading drop down lists in an InfoPath repeating table
- Cascading drop-down list boxes in InfoPath 2010
- Filtered cascading drop-downs in InfoPath browser forms using SharePoint lists and WSS owssvr.dll
- Dependent drop down lists with disappearing items
- Cascading multi-select list boxes with validation in InfoPath 2013