Help needed creating a filtered dropdown - InfoPath Dev
in

InfoPath Dev

Help needed creating a filtered dropdown

Last post 04-04-2014 05:21 AM by Larry W. Virden. 16 replies.
Page 2 of 2 (17 items) < Previous 1 2
Sort Posts: Previous Next
  • 03-20-2014 10:39 AM In reply to

    Re: Help needed creating a filtered dropdown

    Hi - you can walk through the data connection wizard for the data connections to change whether something runs on load - it is in the last dialog in the wizard.

    I think for your filter you want this instead:

    d:Department_x0020_Code = xdXDocument:GetDOM("CAS Department Numbers and Names and Divisions")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Department_x0020_Number[../d:ID = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Sponsoring_x0020_Department]

    So, for the first drop down in the filter, you can select Department Code, then the second drop down is "is equal to" and in the third drop down, select Use a formula and paste in:

    xdXDocument:GetDOM("CAS Department Numbers and Names and Divisions")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Department_x0020_Number[../d:ID = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Sponsoring_x0020_Department]

    Hilary Stoupa

  • 04-04-2014 05:21 AM In reply to

    Re: Help needed creating a filtered dropdown

    I tried to reply to this message once before but the system appears to have "eaten it".

    I wanted to post a reply that described my current approach to solving this problem. I really appreciate the help provided by so many of you. There is a "thinking in InfoPath" that has to occur which is difficult to achieve. I won't say that I am there now - but my brain is slightly more warped around that pattern than it was earlier.

    The final solution includes at least these steps.

    1. I removed the lookup columns from my custom list and replaced them with single lines of text.

    2. I implemented the lookup/drop downs via controls on the InfoPath form.

    3. I created data connections to the lists that were the source material for the dropdowns.

    4. I created drop down boxes, and pointed them to the data connections. The initial drop downs load their data when the form starts. However, the cascaded drop downs do NOT do that

    5. Within the initial drop downs, I point them to the appropriate data connection for their source. I set the display name to be the column the users want to see (which in my case was a calculated column that glues data from other columns together). The value that I have the drop down return is the column value - not the ID - of the item selected.

    6. I created a rule with 2 actions on the initial drop downs. The condition is "when the value changes". The first action is to copy the value to the query field of the cascaded control's data connection that is the corresponding column. The second action is to invoke a query on the second data connection. This results in the second data connection's result set being those rows that match the value obtained from the first drop down.

    7. In the second drop down, I made certain that the populated data connection was selected as well as the value that I wanted to be returned and the column containing the display name to use.

    This works really slickly.

    I think those are the relevant parts to the proces.

    Thank you all so much.

    http://wiki.tcl.tk/
Page 2 of 2 (17 items) < Previous 1 2
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.