Drop Down List - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Drop Down List

Last post 07-20-2005 01:46 PM by mdsmitty. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-20-2005 08:49 AM

    Drop Down List

    I have a Repeating Section with 2 Drop Down Lists. I want to make a selection from DDL1 and have it populate DDL2 from different datasources.

    If DDL1 = "Table A" then DDL2 is populated with a list of selections from an SQL table called "Table A. If DDL1 = "Table B" then DDL2 is populated with a list of selections from a different SQL table called "Table B".

    Is this possible and can anyone point me in the right direction.

  • 07-20-2005 10:13 AM In reply to

    PS - the first drop down is populated manually.
  • 07-20-2005 11:49 AM In reply to

    Yes it is possible, but for that your query should return same column names in both the cases and you need to take care the table name that is returned to InfoPath is same in both cases.

    Other wise you can do one thing, fill another datasource with the data from two table and display the related data depending on the DDL1 value.

    Hope this gives you an idea!

    InfoPath Dev India
  • 07-20-2005 01:13 PM In reply to

    Hi Agni, thanks for the response but I am not sure that I understand.

    If I have 5 selections manually entered into DDL1 - Med, Lab, Rad...etc and let's say I select Lab, how do I get the Lab Table to display the listing of all the Labs in DDL2? Can I do this by making Rules? I'm not exactly sure where to start is basically what I am saying.

  • 07-20-2005 01:24 PM In reply to

    Hi Smitty, When you select you DDL1 Med, get the data from the "Med" table and fill another datasource which is actually mapped to DDL2.
    When you select DDL1 Lab, get the data from "Lab" table, remove the existing rows in the datasource that is mapped to DDL2 and enter the values that you got from "Lab" table.

    Otherwise write a stored procedure that takes table as input and gets the data from the that table and returns the same structure of data everytime. Take a connection to the database and call this stored procedure. When ever you change the value in DDL1 requery the connection with the new selection as Input to the stored procedure.

    InfoPath Dev India
  • 07-20-2005 01:43 PM In reply to

    Thanks Agni, 2 questions:

    1. Do I map everything from DDL1 using Rules?
    2. How should I set the properties on DDL2?

    I'll play with this for awhile and see what I come up with.

  • 07-20-2005 01:46 PM In reply to

    PS...one more question
    Do the Tables (med, lab, rad) need to be part of the main connection or are they a secondary connection?
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.