Assistance w/code Browser enabled form w/Cascading drop-downs & repeating tables - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Assistance w/code Browser enabled form w/Cascading drop-downs & repeating tables

Last post 09-17-2010 01:54 PM by ErnestoM. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 09-15-2010 12:49 PM

    Assistance w/code Browser enabled form w/Cascading drop-downs & repeating tables

    Long time lurker, first time poster :)

    I have a web browser form which needs cascading dropdowns that is almost working.  I'm attempting to do this:http://www.bizsupportonline.net/browserforms/dynamically-fill-drop-down-list-box-browser-form-using-other-form-as-source.htm (but using the owssvr XML queries & dynamic URL - this works fine)

    Here's my code:

    // Get the name of the InfoPath form to use from the groupSize drop-down list boxstring selectedXMLFile = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:Details/my:groupSize", NamespaceManager).Value;

    // Retrieve the data connection bound to the partNum drop-down list boxFileQueryConnection con = (FileQueryConnection)DataConnections["owssvr"];

    // Change the location of the data connection to point to the XML file selected in groupSizecon.FileLocation = @"http://<servername>/_vti_bin/owssvr.dll?Cmd=Display&List={F3A6AFDC-446C-472B-B9A3-887EE49685D8}&View={05C554A2-458C-47FC-92D1-0DE2EA8454FB}&XMLDATA=TRUE&FilterField1=PART_Group&FilterValue1=" + selectedXMLFile+ "&?noredirect=true";

    // Query the data connection to fill the partNum drop-down list box with owssvrcon.Execute(); 

     

    While this works for the Group Size filter, it applies the same filter to all rows in the repeating table. 

    So I found this: http://www.infopathdev.com/blogs/david/archive/2007/08/24/implementing-cascading-dropdowns-in-forms-server.aspx which provides a workaround & even a working template.  When I attempt to modify this, I get lost in the code.

    Since I don't really code, I am unsure which piece(s) of the code I should be adding to get the repeating field (partNumSource) in repeating table loaded with the query.  I realize that last line of code above makes the dropdown become populated by the query results.  How do I fix this?  I hope I’m making sense! 

  • 09-17-2010 05:02 AM In reply to

    Re: Assistance w/code Browser enabled form w/Cascading drop-downs & repeating tables

    Cascading dropdowns in a browser form has been troublesome. The first site you link provides one solution, and the author of the article is the best person to troubleshoot the code.

    The article from our blog is a bit old (2007) and since then we released qRules, which may allow you to accomplish what you want to do. Please read this. Since you're not a programmer (nor am I) qRules is a good solution.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 09-17-2010 08:14 AM In reply to

    Re: Assistance w/code Browser enabled form w/Cascading drop-downs & repeating tables

    IT WORKS! I'm so happy - this has been the biggest pain!

     Thank you & we will have to buy this product :)

  • 09-17-2010 01:38 PM In reply to

    Re: Assistance w/code Browser enabled form w/Cascading drop-downs & repeating tables

    I'm glad it worked for you!
    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 09-17-2010 01:41 PM In reply to

    Re: Assistance w/code Browser enabled form w/Cascading drop-downs & repeating tables

    It works in the client but won't open in the browser.  And Design Checker gives me no errors, no messages.  Any ideas out there?

  • 09-17-2010 01:54 PM In reply to

    Re: Assistance w/code Browser enabled form w/Cascading drop-downs & repeating tables

    Can you temporarily display the Error, Result and and Success fields in the form? When you execute the command, if there is an issue, this will tell us what it was.

    I'm attaching the latest version of the qRules user guide and Quick Start document to this post as a zip, which were just finished today and will be attached to the downloadable package. Some possible causes:

    1. Make sure you checked "Browser compatible features" when injecting.

    2. If you're deploying to ShP 2010, go to Developer > Language > Compatibility, and select Web Browser Form (InfoPath 2007) from the Form type: drop down. qRules uses the InfoPath 2007 Object Model. This means that we need to use the InfoPath 2007 Web Browser form in SharePoint 2010.

    3. Make sure that any controls that make use the qRules commands are set to ALWAYS send data to the server. To do this, right-click on the control to show its properties, and go to the Browser forms tab, then select Always.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.