Dynamic data connection - InfoPath Dev
in

InfoPath Dev

Dynamic data connection

Last post 07-26-2011 10:45 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-26-2011 06:17 AM

    Dynamic data connection

    Is it possible, in IP 2010 browser forms, to change the data source for a dropdown based on input of another field? I have multiple sub sites, each with an issue list. The lists are identical and so far I have been forced to add a section for each sub site and hide show based on selection. I would rather have one drop down and change data source based on selection of a field. Can this be accomplished?

    Kind regards,
    Larry
    Filed under:
  • 07-26-2011 10:02 AM In reply to

    Re: Dynamic data connection

    I can't think of a way through the UI, except the approach you've taken w/ multiple dropdowns that use different data sources. If you data source is SQL, maybe you could create a view with all the options and a way to filter based on the other field.... but if they are assorted SharePoint lists, for example, the conditional formatting route may be the most straightforward.

    Hilary Stoupa

  • 07-26-2011 10:29 AM In reply to

    Re: Dynamic data connection

    Thanks Hilary, First I would like to say you rock! I have followed this site for many years and your solutions are fabulous. When you state the conditional formatting route you mean the multiple hidden dropdowns and only showing the valid one based on user selection, right?

    Kind regards,
    Larry
  • 07-26-2011 10:45 AM In reply to

    Re: Dynamic data connection

    Aw, thanks!

    Yup, multiple dropdowns, each using the specific data source, and only show one based on what the user selects. It is clunky, and can be a little hard to work with in design mode, but it is the most straightforward approach.

    Here's some stuff I would do to make it a bit better -

    1. Query only the data source I need when the first field is filled in. That is, let's say your first field is called "Category" and your second field is called "Subcategory". You have 4 possible data sources for Subcategory. When the Category field changes, run the query for the data source for the Subcategory drop down that will be displayed. This way you aren't loading data you may never need.
    2. Add some expression boxes (calculated values) over each drop down that have conditional formatting to always hide ("The expression" for the first drop down in the formatting, and then just the number 1 for the expression as the condition, with Hide this control for the formatting). Then you can have labels for each drop down that will only show in designer, so you don't have to open up the properties for each to see the data source. It will just make it easier to keep them straight in design mode when all of them show. 

    Hope that makes sense... :-}

    Hilary Stoupa

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