cascading dropdowns - InfoPath Dev
in

InfoPath Dev

cascading dropdowns

Last post 05-01-2012 08:15 AM by sjain. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-30-2012 06:45 AM

    • sjain
    • Not Ranked
    • Joined on 12-20-2011
    • Posts 7

    cascading dropdowns

    Hello:

     I have an IP 2010 form with 2 dropdowns. The first is populated using a data connection (client). The second dropdown is a cascading dropdown populated using a second data connection (matter) based on the client value selected in the first dropdown. There is code behind (using C#) to filter the second dropdown. Everything works fine when I create the form. However, when I go back to reopen the form to edit, the second dropdown is blank.

    In the selectClient_Changed event, I am calling the data connection to populate the matter dropdown. The value is obviously there in the XML, but, does not show up in the matter dropdown.

    The form is browser enabled. 

     How do I fix this issue? Your help is greatly appreciated.


    Thanks

  • 04-30-2012 07:18 AM In reply to

    Hi,

    Did you check if you have any rule running on Form Load that sets the value of the second dropdown to blank? I'm also wondering why your using code when you can make cascading dropdowns using rules and filters in InfoPath itself.

    Jo-Anne

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 05-01-2012 08:15 AM In reply to

    • sjain
    • Not Ranked
    • Joined on 12-20-2011
    • Posts 7

    Thanks for the reply. This is my situation.

     This was originally an IP 2007 web enabled form with cascading dropdowns which meant code behind and admin approved.

    I have 2 data connections.

    The first one, (called client) is the main which is configured to automatically retrieve data when the form is opened. This connection is configured to receive data from a sharepoint list (called client)

    The second one (called matters) is dependent on the client data connection. It is also configured to receive data from sharepoint lists.

    On my form, I have 2 dropdowns. First, called Client gets populated by the client data connection. On this dropdown, I have a rule that will query the matter data connection when client is not blank.

    I have 1 rule on the matter dropdown which is to populate a read only textbox when something is selected in this dropdown.

    The code behind filters the matter dropdown based on the value selected in the client dropdown.

     Everything works fine when i create a new form. The problem comes when I re-open this form for editing. The client dropdown is populated and has the correct value selected. However, the matters dropdown, although filtered based on the client selected, does not have the value selected (is blank), and hence the read-only texbox is blank as well. I can see the value of the matters dropdown in the XML though.

     Is there a solution to my problem or should I redesign the form and get away with code behind completely?

     Thanks for your quick response.

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