This project has moved. For the latest updates, please go here.

Trying to use SPCascadeDropdown and CAML to select from a massive list

Mar 15, 2013 at 5:03 AM
I have a very large list of classes which I need to allow the user to select multiple ones of.

I have the cascade working fine based of the school the class runs under and all is good apart from its still hitting the throttle limit as the whole list is being brought back.

It seems that I should be able to use CAML and perhaps :
operation: "GetListItems",
To only pull back what the user selects from the parent but based on my lack of results I either misunderstood what it could do or I'm doing the wrong thing...

Can anyone point me to some examples please???

my working cascade is:
$(document).ready(function() {
relationshipWebURL: "/",
relationshipList: "Courses",
relationshipListParentColumn: "School",
relationshipListChildColumn: "Class",
parentColumn: "SchoolPick",
childColumn: "Class",
listName: $().SPServices.SPListNameFromUrl(),
simpleChild: false, // Added in v0.6.2
selectSingleOption: false, // Added in v0.6.2
matchOnId: false, // Added in v0.7.1
completefunc: null,
debug: true

I have a courses list, Schools list, and in this case a student list.
Mar 15, 2013 at 12:57 PM

SPCascadeDropdowns only requests the items from the list which matches the parent value selected. In other words, it's already doing that filtering for you.

Are you hitting the 5000 item throttle limit? If so, then perhaps you should rethink your list structures.

Mar 16, 2013 at 1:55 AM
Thank you for responding but are you sure about that? When I view the source I can see that all of the items in the list are returned .. yes only a subset are shown in the select list but the whole list is returned.

The subset is well below 5000 items but the whole list is over.. thus nothing is shown in the list if throttling is active...

So does/can SPCascadeDropdown just grab via CAML the subset list based off of the parent choice and then do that again every time it changes or can it only change a view of the data collected at load I think I'm asking... I am seeing some samples with AJAX switches so it feels like it should but for the life of me I can't find anything that says it can :(
Mar 16, 2013 at 4:00 AM
If you mean the initial load of the form, then yes, SharePoint attempts to load all the values.

You call SPCascadeDropdowns on page load, and from there the function only requests the data required upon a parent change.