This project has moved and is read-only. For the latest updates, please go here.

Cascading DropDown - Multiple Children

Nov 10, 2009 at 4:23 PM


Firstly I really like the functionality you have created.

I'm pretty new to this and would appreciate some help.  I tried to implement your cascading dropdown function on a sharepoint form and it works perfectly until I try to have one dropdown alter the selection of 2 children dropdowns.  Another issue I'm having is where I'm trying to preset the value of the original drop down using JQuery as this doesn't invoke, what I presume is the onchange event.

On a different note, I was wondering if you could recommend any sites or books I could use to get my head round all of the this.

Thanks for your help


Nov 11, 2009 at 3:23 AM
Edited Nov 11, 2009 at 9:56 PM


I released v0.4.5 today, which fixed a couple of bugs with SPCascadeDropdowns.  Give it a try and let me know if you still have problems.  You might just want to set the default value in the column settings on the list.

I'm always the wrong guy to ask about sites and books because I tend to learn by doing more than reading.  I would definitely recommend, though.  (I'm writing a series of articles about the library for EUSP.)  SharePoint and jQuery is a relatively new thing, so I don't know that you'll find anything that covers the two together in much depth.

Let me know how it goes and what you end up using the library for.  I'd like to get some "real world stories" into an upcoming article (obfuscated as needed).


Nov 23, 2009 at 10:54 AM

Hi Marc,

Sorry it took me so long to reply but I managed to get the flu for a couple of day, thankfully not the swine variety.

I've tried the new version and I'm still getting some issues.  The debug doesn't show them so I'm presuming its with the function that's being binded to the control.

On the update side of things I'll give you a quick overview of what I'm trying to achieve.  I have 10 different divisions which complete and return a form.  These are then sent to one of 6 different central areas.  The form bounces between the division and central area before it is signed off.  It may then need to be either closed or renewed at a later stage.  The form itself has mandartory fields depending on the stage and different sets of users will see different fields. 

What I've done so far is to;

  • Create a master list which will be used for any central admin functions. 
  • Create a dummy list for each of the Divisions and Central areas.
  • Create a filtered data source for each of the Division/Central Areas (this is to prevent Directory Traversal (i.e. adding a ID to the end of the URL to see others entries)).
  • Add a DataView to the dummy pages (hiding the normal form view) and linking to the filtered data sources.
  • Add Targeted Audience to the DVWP to prevent other area accessing the data.
  • The All_Items views for each of the division have header button to redirect to alternative filtered view (i.e. At a particular stage etc).
  • Create a JavaScript file for the application with 2 main functions (one sudo onload and the other presave action);
    • On load will show/hide, set up cascading and highlight (mark as mandatory) fields depending on the user group and status.
    • The presave function check the mandatory fields before allowing the save action.
    • The buttons on these forms also make changes to the data to allow the status to change (i.e. There is a "Submit to Central area" which changes the hidden status before trying to save the data).
  • Behind all of this is a workflow which is a basic on change so that when the status of the form changes an email is sent to the division or central area which needs to take some action.

I did consider creating a only the 2 sets of forms with a link to another list which determines what people can see, but this would be a admin nightmare for a central admin function as they would have to keep this upto date.

I'm not sure if this is the best way of approaching all of this, but not being the most experience I'd appreciate any comment you might have.  My major concern at the moment will be people switching off JS in the browser but as everything is audited we'll be able to pick that up if it happens!

Thanks for your help.



Nov 23, 2009 at 6:27 PM


Sorry to hear about your flu bout.  It sounds like you have things well in hand.  You're certainly past the point where a causal observer like me is going to be able to correct your course!

What issues are you still having with the SPServices library? I'm about the lrease v0.4.6, which fixes some bug as well as adds some functionality.  You might want to try that and see if it fixes your issues.

As for switching off JavaScript in the browser, very little of the useful stuff in SharePoint would work for them at that point. This application would be the least of their worries.


Nov 24, 2009 at 2:55 PM


Hi Mark,

The issue I'm having is getting an "Unspecified Error" when I'm trying to call your function more than once for the same Parent Column (there was also something with using the & symbol in the field which was confusing things).  Essentially when I run the code below all the call work when implemented on thier own but when the 1st and 3rd are run together, there is an error.

//Call 1
 $().SPServices.SPCascadeDropdowns	({
            relationshipList: "Sub Division",
            relationshipListParentColumn: "Division",
            relationshipListChildColumn: "Title",
            parentColumn: "Division",
            childColumn: "Sub Division"

//Call 2
 $().SPServices.SPCascadeDropdowns ({
            relationshipList: "Users",
            relationshipListParentColumn: "Policy",
            relationshipListChildColumn: "Email_Address",
            parentColumn: "Group Policy Statement",
            childColumn: "Policy Contact"

//Call 3
  $().SPServices.SPCascadeDropdowns ({
            relationshipList: "Users",
            relationshipListParentColumn: "BU_Division",
            relationshipListChildColumn: "Email_Address",
            parentColumn: "Division",
            childColumn: "Business Contact"

Thanks for your help.
Nov 24, 2009 at 3:53 PM


Any number of cascades ought to work (I haven't tested more than four, though!).  What version of the library are you using? I'm about to release v0.4.6, which contains a couple of improvements to SPCascadeDropdowns, so you might want to try that version.  The currently posted alpha is what I'm going with, so you'll be getting the version I release.

The relationshipListParentColumn and relationshipListChildColumn both need to be the StaticNames for the columns, which would have characters like the ampersand encoded.