Fill a drop down list base on another - InfoPath Dev
in

InfoPath Dev

Fill a drop down list base on another

Last post 04-26-2008 09:08 AM by Clay Fox. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-25-2008 01:26 AM

    Fill a drop down list base on another

    I have two sharepoint lists :

          1- Department : title

          2- Contacts : FirstName , LastName, Phone , Department(look up Column which is bound to Department list )

     

    so, I have  Designed a form in infopath  which has two dropdown lists , the first one is linked to Department list and I want by changing elements in the first drop down list the  second drop downlist filled by Contacts which are in the selected department

     

    please tell me how is that possible .

    Attention : My form Is browser enabled and [filters] are not allowed .   

    Thanks alot in advanced .

    Filed under:
  • 04-25-2008 08:30 AM In reply to

    • Albert
    • Top 500 Contributor
    • Joined on 04-03-2008
    • The Netherlands
    • Posts 32

    Re: Fill a drop down list base on another

    You can add a filter to the second dropdownlist. Only display the items where the text in department dropdownlist is equal to the department in your secondary datasource.

     

  • 04-26-2008 12:06 AM In reply to

    Re: Fill a drop down list base on another

    but filters are not enabled in browser forms .

  • 04-26-2008 12:28 AM In reply to

    • Albert
    • Top 500 Contributor
    • Joined on 04-03-2008
    • The Netherlands
    • Posts 32

    Re: Fill a drop down list base on another

    Im sorry, you are right. I can't think of an alternative...
     
    Edit: well, maybe one, but this is really dirty.
    Use several datasources for your second selection and bind each datasource to a dropdownlist. Bind all the dropdownlists to the same datafield. Use conditional formatting to hide/show them based on your first selection. To avoid invalid combinations you could add a rule on the first selection that clears the second.
     
    Like i said, this is really dirty, but as far as i know the only option.
     
    Albert
  • 04-26-2008 09:08 AM In reply to

    Re: Fill a drop down list base on another

    This can be done.

    Their are ways using code but the best is with a dynamic web service.

    As you known default secondary data connections return all data and a filter must be used to exclude what is not needed.

    This is a showstopper for browser forms and where data sources are large (thousands of records).

    Qdabra Database Accelerator includes a web service that you can dynamically query a SQL table.

    So you can use the value in the first dropdown in a query for the second. So the data returned is only what matches the first value.

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