Populate a Dropdown on condition - InfoPath Dev
in

InfoPath Dev

Populate a Dropdown on condition

Last post 06-30-2007 04:01 AM by saudak. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-28-2007 09:09 AM

    Populate a Dropdown on condition

    Hi,

    I have 3 datasources A , B_1 and B_2, I have 2 dropdown lists drpA and drpB, I populate drpA with datasource A, Based on the value of drpA, I need to load drpB with B_1 or B_2

    Like:

    in drpA if the selected value is 1 I have to load B_1 in drpB else

    if the selected value is 2 I have to load B_2 in drpB .

    Any Ideas??? Please help

     Update:::

    I wrote a little code that gets the value of drpA and select the datasource , but I cannot populate the values I get from the datasource, into the drpB

    I was thinking on the lines ;;;

    For i = 0 To objdsB_1.length - 1

          XDocument.DOM.selectSingleNode("/my:myFields/my:drpB").Add = objdsB_1(i).selectSingleNode("@data").text ' This doesnt work!

    next

  • 06-29-2007 08:07 AM In reply to

    Re: Populate a Dropdown on condition

    The simple, basic way to do this is just to have both drop downs, B_1 and B_2 on the view but Hide them both until A is chosen and then do not show the one you don't need. So depending on A's value show the corresponding B dropdown and keep the other hidden and vice versa. I am not sure having a dynamic drop down from two seperate tables is possible but this is a lot simpler and the user would never know the difference.
  • 06-30-2007 04:01 AM In reply to

    Re: Populate a Dropdown on condition

    Thanx clay

    I came up with a the way ... the problem with me is, I start writing code before starting to see the control formatting in InfoPath itself.

    I made it into one datasource with onother field on which I added a filter and it worked. 

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