Use a SharePoint list for dependent multi-select list boxes on an InfoPath 2010 browser form
Learn how you can use a SharePoint list (or multiple SharePoint lists) to create dependent list boxes on an InfoPath 2010 browser form published to SharePoint 2010.
And just like you can now create dependent or cascading drop-down list boxes in InfoPath 2010 where items displayed in the second list depend on the item selected in the first list, you can also create dependent multiple-selection list boxes without writing code.
The principle is the same for both drop-down list boxes and multiple-selected list boxes, that is, you must use the Filter Data option when setting the Entries for the dependent list and add a filter that uses the values selected from the first list to filter the second list.
Figure 1. Dependent multi-select list boxes in an InfoPath 2010 browser form in SharePoint 2010.
Suppose you have two multi-select list boxes on an InfoPath 2010 form template: One named brand and another one named model. The Main data source of the InfoPath form resembles the following figure:
Figure 2. Main data source for a form template with 2 multi-select list boxes.
In addition, you have the following SharePoint list in which you have a bunch of running shoe models with their corresponding brand.
Figure 3. SharePoint list to be used for dependent multiple-selection list box.
To create dependent multi-select list boxes, you must populate the brand multi-select list box with the Brand names from the SharePoint list, and select the check box to Show only entries with unique display names on the Multiple-Selection List Box Properties dialog box, because the SharePoint list contains duplicate brand names.
Then you must populate the model multi-select list box with the Title field from the SharePoint list, and filter the Brand names of the Entries from the SharePoint list on the selected names in the brand multi-select list box. The filter would say:
Brand = brand
where Brand is from the secondary data source and brand from the Main data source.
That is all that is required to get the functionality displayed in Figure 1.
This solution also works if you do not have one SharePoint list, but two SharePoint lists where one SharePoint list contains the brand names and the second SharePoint list contains the names of the models with a lookup column for the brand names from the first SharePoint list (two linked SharePoint lists).
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.