Cascading multiple-selection list boxes in InfoPath 2010
See an InfoPath demo of how you can use a SharePoint list to populate two multiple-selection list boxes on an InfoPath form and then have cascading or dependent functionality between the items displayed in the multi-select list boxes.
A multiple-selection list box is a combination of a normal list box and check boxes. This means that you can select one or more check boxes in the list to be able to select multiple items. And there is where the name multiple-selection list box comes from.
In InfoPath, you can either configure a multi-select list box to contain static items that can be selected, or you can bind the control to a data source to populate the multiple-selection list box dynamically with items. One such data source is a SharePoint list.
The same technique you use to create cascading drop-down list boxes in InfoPath, you can use to create cascading multiple-selection list boxes in InfoPath. This includes when you use SharePoint lists as the data sources for multiple-selection list boxes.
However, because there are no actions for rules in InfoPath you can use to deselect items in a multiple-selection list box, you would have to write code to automatically deselect an item when its parent item is deselected.
A codeless option would be to add data validation to a multiple-selection list box that checks whether an item does not have a parent item and displays an error message if this is the case, so that the user can manually deselect the item that does not have a parent item selected.
The InfoPath video shown below (which makes use of code) is a demonstration of how you can use a SharePoint list to populate two multiple-selection list boxes and provide cascading or dependent functionality between the two multi-select list boxes. A full description of the solution is available for all members of the InfoPath 2010 Cookbook 3 Club.
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:
- InfoPath multiple-selection list box
- Pre-select items in a Multiple-Selection List Box in InfoPath 2010
- Cascading multi-select list boxes with validation in InfoPath 2013
- Create text boxes for items selected in a multiple-selection list box in InfoPath 2010
- Use a SharePoint list for dependent multi-select list boxes on an InfoPath 2010 browser form
- Display SharePoint users in an InfoPath multi-select list