Filtering a Drop Down list inside a repeating table - InfoPath Dev
in

InfoPath Dev

Filtering a Drop Down list inside a repeating table

Last post 01-19-2009 10:08 AM by B4d_k42ma. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-19-2009 06:59 AM

    Filtering a Drop Down list inside a repeating table

    I'm running a browser based form in Sharepoint. What I want to be able to do is filter the values of the Drop Down list in the first column so that once a value is selected in one row, it wouldn't appear in the drop down any more in the next row.

    I'd like to either have the previously selected values removed from the dropdown list, or be able to apply some validation if the same value is selected twice. Anybody happen to know how to do this or have a really cool trick they could share? Thanks!

    rpting table
  • 01-19-2009 08:32 AM In reply to

    Re: Filtering a Drop Down list inside a repeating table

    Excellent links, the last one and first one are the ones that looks like could solve my problem.

     But I forgot to say one thing. I need to try to do this without using any code behind..if possible.

  • 01-19-2009 08:37 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Filtering a Drop Down list inside a repeating table

    Filtering will not work in the browser forms. So we need to use code to do this.

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 01-19-2009 08:40 AM In reply to

    Re: Filtering a Drop Down list inside a repeating table

    I feared this might be the case, alright. Thanks for links though, they should help..I'll see if I can talk my Sharepoint admin into letting me use Code.

  • 01-19-2009 10:08 AM In reply to

    Re: Filtering a Drop Down list inside a repeating table

    Actually after looking at these links a bit closer I know how to do what these articles are doing without code, they aren't doing what I'm looking for. To do this without code, what I've done is below.

     

    Set your state equal to what is shown below.

     step1

     

     Now, set your 2nd field (usually cities, in my case it's regions) equal to what is below. My webservice it's querying is basically this SQL stmt.

    Select description from regions where state_id = @state_id

     So I set my Region Field equal to the region description as shown below

     step2

     And then I set a rule that says that when field1 is not blank, I set @State_ID field in my getRegions query = the state_id in my GetStates query where the state = field1.

     The xpath and a pic is below

    xdXDocument:GetDOM("MT_getAllStates")/dfs:myFields/dfs:dataFields/tns:MT_getAllStatesResponse/tns:MT_getAllStatesResult/NewDataSet/ReturnedData/state_id[../state = xdXDocument:get-DOM()/my:myFields/my:field1]

     final

     Then, add a second step in the rule that queries the GetRegions webservice.

    Effectively, you've got cascading drop down lists, or Master Detail with no code needed.

     

    Anyway, You all may have this trick somewhere, but I figured I'd try to contribute..And in the meantime, I'll try and see what I can do about my issue.

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