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 »

 


Related InfoPath Articles:

 

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. 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.

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners

InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013

InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010

InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers

InfoPath 2010 Cookbook 4: 101 Code Recipes for VB Developers

InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services