InfoPath Q&A: Does InfoPath support cascading drop-down list boxes in a repeating table?

by S.Y.M. Wong-A-Ton

Learn which options are available to you if you want to filter lists on an InfoPath form to create cascading drop-down lists.

I won’t post the entire question that a visitor recently asked me about cascading drop-down list boxes within repeating tables here, since it’s very long, but instead will extract the essence and rephrase the question here.

Pongrat recently asked whether it is possible to have a drop-down list box from one column in a repeating table depend on another drop-down list box in another column. 

The drop-down list boxes are filled with data from 2 SharePoint lists, and when an item is selected from the first drop-down list box, only the items related to the selected item should be shown in the second drop-down list box.

While this question has already been asked many times in the InfoPath newsgroup and SharePoint – InfoPath Forms Services forum, I think there is still some confusion out there as to whether InfoPath does or does not support filtering in data sources, which are bound to list boxes.

The short answer is “yes”, but there is a twist:

  1. If you are designing an InfoPath form template that is not browser-compatible and which will not be filled out through a browser but rather through the InfoPath client application, you will be able to use the Filter Data option that is available on a secondary data source. There is a tutorial on InfoPathDev that shows you how to create cascading drop-downs.
  2. If you are designing an InfoPath form template that is browser-compatible, you will not be able to use the Filter Data option, but will have to either create and use a web service to retrieve and filter the data, or write code that will do the filtering for you. The InfoPath Team has written a blog post about cascading drop-down list boxes in browser forms.

So to summarize:

  1. If you are going to fill out forms through the InfoPath client application, make sure that you do not specify that a form template should be browser-compatible. Then you will be able to use the Filter Data option to create cascading drop-downs without writing a single line of code.
  2. If you are going to fill out forms through a browser, your only 2 options for filtering data will be to 1. write a web service, or 2. write code within the form template itself to filter the data in the list.

Update September 26, 2009:
I recently published an article on using WSS’ owssvr.dll to filter SharePoint lists and create cascading drop-down list boxes on an InfoPath browser form. This article comes with a short demo video on YouTube.

 Subscribe (RSS | Email)

Related Posts

  1. 2 Responses to “InfoPath Q&A: Does InfoPath support cascading drop-down list boxes in a repeating table?”

  2. Frederik Van Lierde
    Posted Thursday, 20 November 2008

    Hi

    The MSDM Blog Team wrote an article about Cascading Dropdowns with InfoPath Forms using webservices

    Please have a look at the following Url, I explain an alternative way how to Implement Cascading Dropdows in InfoPath forms, without webservices, and will work with any data connection, also Sharepoint List


    http://blueinfopath.blogspot.com/2008/11/cascading-drop-downs-in-infopath-web.html

    Frederik Van Lierde
    http://www.SilverSandsAssociates.com

  3. S.Y.M. Wong-A-Ton
    Posted Friday, 21 November 2008

    Thanks for sharing. When I get a chance, I’ll check it out.

Comments to this post were closed 30 days after it was published.

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

Working with InfoPath