Cascading dropdown - browser form issue - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Cascading dropdown - browser form issue

Last post 11-22-2011 06:58 AM by aditya.reddy. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 01-31-2007 07:44 AM

    • ivl
    • Not Ranked
    • Joined on 08-25-2006
    • Posts 12

    Cascading dropdown - browser form issue

    Well I've almost given up.
    I think I've tried every method on the internet and have almost concluded that what I am trying to do is not possible.

    I have a repeating table with two drop-downs. The selection of the first drop-down should be the filter for the second drop-down. This is in a browser-enabled form.

    The How-To tutorials and sample forms that I have found on this site only show how to do it in a non browser enabled form. They all use filters, be it by editing the view XSL or just by clicking on Filter Data, something which browser-enabled forms do not support.

    I have found three methods (which are all similar) for filtering data in browser forms where the drop-downs are NOT inside a repeating table:

      http://blogs.msdn.com/infopath/archive/2006/10/12/cascading-dropdowns-in-browser-forms.aspx which makes use of a web service and re-queries the web service whenever the first drop-down selection changes
    • Using a XML secondary data source which gets its data from http://server/_vti_bin/owssvr.dll?Cmd=Display&List={GUID}&XMLDATA=TRUE and, with code, appending "&FilterField1=ColumnName&FilterValue1=FilterVale" to the URL

    • Using code to reduce a secondary data source containing all of the values and populate a XML file from which the second drop-down gets its values from, whenever the first drop-down selection changes. I like this method the most, because the secondary data source is only queried once, when the form is opened.


    The problem is that, well, the drop-downs are in a repeating table. If there are multiple rows in the repeating table and the selection on the first drop-down changes on ONE of the rows, the second drop-down on ALL of the rows changes.

    I have also tried editing the XSL for the view, adding a XSLT variable (as one of the tutorials suggests) and trying to force a filter using XPath. When I re-open the form in design mode, InfoPath correctly informs me that I am trying to cheat the system and that filters are not supported in browser forms.

    Please, if anyone knows of a way to achieve what I am trying to achieve, I would be extremely grateful if you can share it.
  • 01-31-2007 11:36 PM In reply to

    Re: Cascading dropdown - browser form issue

    Hi

    You need to use the current() function. Look at the following link:

    http://blogs.msdn.com/infopath/archive/2004/03/24/create-dependent-drop-down-list-box-in-infopath-using-filters.aspx

    http://blogs.msdn.com/infopath/archive/2004/09/13/228881.aspx
    Madhuri
    http://www.ggktech.com
  • 01-31-2007 11:58 PM In reply to

    • ivl
    • Not Ranked
    • Joined on 08-25-2006
    • Posts 12

    Re: Cascading dropdown - browser form issue

    Hi madhuri,

    Thank you for the reply.

    Unfortunately, both examples make use of filters, which browser forms do not support.

    I need to get this working for a browser-enabled form in InfoPath 2007.

    Filtering in browser forms is accomplished by modifying the data source from which a drop-down gets its values. The three methods in my previous post all do this. This immediately poses a problem, though, since the data source can then only contain ONE set of values for ONE drop-down.

    My form has a repeating table. The first column contains a drop-down which does not require filtering. The second column contains a drop-down which needs to be filtered according to the selection of the first drop-down (for that specific row). If a new row is inserted and the drop-down in the second column requires values different than the ones on the preceding row, the data source needs to be modified again. But, once the data source is modified, ALL drop-downs in the second column change their values, since they are all bound to the same data source.
  • 02-01-2007 12:19 AM In reply to

    Re: Cascading dropdown - browser form issue

    Hi

    Just look at this link for a browser-enabled form in InfoPath 2007.
    http://office.microsoft.com/en-us/infopath/HA100242811033.aspx

    Thank you
    Madhuri
    http://www.ggktech.com
  • 02-01-2007 08:07 AM In reply to

    Re: Cascading dropdown - browser form issue

    Hi Ivl and welcome to our forum,
    I was able to get this working using current() and browser enabled forms for my presentation today at the SharePoint Solutions conference.
    Patrick Halstead
    Project Manager at Qdabra
  • 02-01-2007 10:45 PM In reply to

    • ivl
    • Not Ranked
    • Joined on 08-25-2006
    • Posts 12

    Re: Cascading dropdown - browser form issue

    Hi Patrick & madhuri,

    Thank you for your replies.

    @Patrick: Could you elaborate on exactly what you got working with current() and browser enabled forms? Did you have two drop-downs, both in a repeating table?

    @madhuri: The link that you sent me specifically says that filtering is not supported in browser forms (by clicking Filter Data). The "See also" section on conditional formatting is a neat trick, but does not solve my problem.

    I think it's best if I create an example form template to illustrate exactly what I am trying to achieve and what the problem is with browser-enabled forms.

    Watch this space :)
  • 02-01-2007 11:47 PM In reply to

    Re: Cascading dropdown - browser form issue

    Hi Ivl,
    You can go to this site:http://formsboard.com/ and login as demo@qdabra.com with pw=InfoPath2007. Click on Sales Leads link. Click New and you will see the form. Let me know if you can't get to the code, but it's pretty easy to do. I had heard that filtering and IPFS didn't work, but seems like this does. It may be that it just requires a server round-trip.
    Patrick Halstead
    Project Manager at Qdabra
  • 02-02-2007 12:12 AM In reply to

    • ivl
    • Not Ranked
    • Joined on 08-25-2006
    • Posts 12

    Re: Cascading dropdown - browser form issue

    Hi Patrick,

    I saw the Sales Leads, Sales Leads Test, Sales Order and Sales Order Test forms, but didn't see any cascading drop-downs in a repeating table.

    I was wondering where to upload the test template that I created, so I uploaded it in the Shared Documents list :)

    It is called CascadingDropdownBrowserForm.xsn and the time-stamp on it is 2/2/2007 12:12 AM

    The tasks drop-down should be filtered according to the current project, and retain its values when a new row is inserted and different project is selected (using IPFS). That is what I am trying to achieve - pretty simple, but I do not think one can do that in browser-enabled forms.
  • 05-05-2008 02:01 PM In reply to

    Re: Cascading dropdown - browser form issue

     I am working on this exact issue.  Has anybody ever figured out how to do such a thing?  Currently I have Ivl's second method implemented.  Thanks for any help!

     Regards,

    Andrew
     

  • 11-22-2011 06:58 AM In reply to

    Re: Cascading dropdown - browser form issue

    The following link may help: http://www.infopathdev.com/files/folders/examples/entry41178.aspx?CommentPosted=true#commentmessage
Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.