How to create cascading dropdown in a form library form NOT a List Form - InfoPath Dev
in

InfoPath Dev

How to create cascading dropdown in a form library form NOT a List Form

Last post 10-19-2015 02:01 PM by lilbiggy24. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 10-14-2015 02:53 PM

    How to create cascading dropdown in a form library form NOT a List Form

    I am trying to get a cascading dropdown to work in my form library InfoPath form. I do not want to use the InfoPath List form as it has restrictions that I need to use a form library InfoPath Form. However, I cannot get it to work. How do I do this? The data connections are from sharepoint lists to received data, but I cannot get one field to filter based on another field in the InfoPath form. Thank you in advance.
  • 10-15-2015 12:03 PM In reply to

    Re: How to create cascading dropdown in a form library form NOT a List Form

    I keep getting a the following error: The query cannot be run for the following DataObject: PlayerProfiles InfoPath cannot run the specified query. Invalid "WHL_x0020_Team" specified in the query fields.
  • 10-15-2015 12:09 PM In reply to

    Re: How to create cascading dropdown in a form library form NOT a List Form

    So - do you have a rule setting WHL Team in the query fields in the PlayerProfiles data connection in your form? What are you setting it to?
    Hilary Stoupa

  • 10-15-2015 01:01 PM In reply to

    Re: How to create cascading dropdown in a form library form NOT a List Form

    Yes, I do - the rule is the query the WHL Teams in the secondary data source I have tried this form 2 different ways. First: No using Rules (just adding data connections and query using the dropdown box properties) This did not work - there was no error, just when I selected the team, the player dropdown would not populate - I can do this way if I used a list form (not a library form, which is the type of form I want) Second: Using rules on the first dropdown (where I am currently getting my error) My Scenario: I have a dropdown where I choose a Team, then a second dropdown that I would like to filter players based on that team chosen. I have 2 lists: Team and Players - pretty simple right? Rule on first dropdown (where initial choice is made - Team) Action 1 - Set a fields value - Field: WHL Team (Secondary Data source, Query Field - WHL Team - Value: . (Current field choice) Action 2 - Query Data - Data Connection to the Player List (with Team as a field set up in the connection) My Drop-down list properties are such - on the Player dropdown - Data Source - Player - Entries - /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:WHL_x0020_Team = xdXDocument:get-DOM()/my:myFields/my:choiceWHLTeam] - Value d:ID - Display name: d:LastFirstName
  • 10-15-2015 02:04 PM In reply to

    Re: How to create cascading dropdown in a form library form NOT a List Form

    I think I have isolated the problem to the second action item in the Rule - Query using a data connection - for some reason it is returning invalid WHL team from that list. I have the list set up with a lookup column for Team. so, I am not sure why it cannot find and filter by that field.
  • 10-15-2015 02:09 PM In reply to

    Re: How to create cascading dropdown in a form library form NOT a List Form

    To start with your initial question - cascading dropdowns work the same way in any form. You add a filter to the second dropdown to only show items based on selections in the first dropdown. Querying to get back just the items you need is an alternate approach - if your dropdowns aren't in a repeating table or section. My assumption is that you are setting the query field for WHL Team to a value that is invalid - since it is a lookup, I'd think you'd need to set it to the SharePoint List ID for the Team - is that what you are doing?
    Hilary Stoupa

  • 10-15-2015 03:12 PM In reply to

    Re: How to create cascading dropdown in a form library form NOT a List Form

    Ok, I would prefer NOT to have rules based on the first field, to be honest with you. In my form, I plan on having multiple Player fields to be filled in, but each of those secondary fields are filtered from the initial Team Field. Pretty straightforward. I was able to get the cascading dropdown to work when I created a third list and then modified the InfoPath form based on this third list - my cascading dropdown worked beautifully (a list form). It is when I apply the same logic under the Form Library form - does is NOT working. When I add the filter to the second dropdown, and I choose the team in the first. I do not get any returned values. I agree, the cascading dropdown should work the same - but unfortunately, I am not doing something correctly.
  • 10-15-2015 03:41 PM In reply to

    Re: How to create cascading dropdown in a form library form NOT a List Form

    Drag your secondary data sources onto the form so you can see the actual values in the different columns. That may help you with your filter. If you want, attach a copy of your form under the Options tab in a reply & I'll try to take a look at it tomorrow.
    Hilary Stoupa

  • 10-16-2015 09:25 AM In reply to

    Re: How to create cascading dropdown in a form library form NOT a List Form

    Thank you Hilary! I created both ways, using the filter and rules on this form. You have no idea how much I appreciate you looking into this - I feel like banging my head against the wall, as it is probably something simple I am missing.
  • 10-16-2015 10:18 AM In reply to

    Re: How to create cascading dropdown in a form library form NOT a List Form

     So, in the attached file, I made a couple little changes - for the two fields in the upper right, I changed the dropdown to store the ID and display the Title. My guess is that in your assorted connected lists, the lookups are going to actually have the ID for the list item, not the text value (even if the text value is what SharePoint displays). I also added a little troubleshooting section you can use to help figure out what the query fields are being set to and what they need to be - the query fields and data fields are on the form with a query button - so you can set values, and try running the query. I think that is usually the easiest way to figure this stuff out - to see what is actually happening. You can just delete all that once you have the form working the way you need it to.

    Save the attached file locally. Right click the file and select Design to open in design mode - from there you can preview. 

    Hilary Stoupa

  • 10-19-2015 02:01 PM In reply to

    Re: How to create cascading dropdown in a form library form NOT a List Form

    Thank you Hillary. That is very helpful. Changing the first field to value of ID (Display 'title'), and using the Rules worked perfectly! Thanks again! I knew it was something simple.
Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.