Can't get child to populate with SPCascadeDropdowns

Aug 14, 2012 at 5:01 PM

For the life of me I can't get this working, and I'm sure it is something simple.

I'm using two lists that were previously being used by the SPCD.js and it work, but I'm looking to move to SPServices.

I have tried with jQuery 1.7.0 and 1.7.2 which are loaded up top with the master page and then below the edit and new forms I am adding the following as a CEWP.

The issue is that the parent filed seems to be working and is populated, but the child only has a (None) option and does not filter down properly at all. The child does have items that exist in multiple parents, ie parent items "Actual" and "Drill" both have their own "Fire" childs, one each.


<script language="javascript" type="text/javascript" src="/SiteAssets/JavaScript%20Librarys/SPServices/jquery.SPServices-0.7.1a.js"></script>

<script language="javascript" type="text/javascript">
  $(document).ready(function() {
      relationshipList: "Incident Subcategory",
      relationshipListParentColumn: "IncidentType",
      relationshipListChildColumn: "Title",
      parentColumn: "Incident",
      childColumn: "Incident - Subcategory",
      //selectSingleOption: true,
      //matchOnId: true,
      //simpleChild: true,
      completefunc: function() {
          console.log("Cascade called")
      debug: true


The parent list is named "Incident - Category" and a URL of "Incident%20%20Category"

This list has one column named "Incident" and a StaticName of "Title", not required and not enforced unique

The child list is named "Incident - Subcategory" and a URL of "Incident%20%20Subcategory"

There are two columns here, "Incident" (StaticName is "IncidentType") which is a lookup to the "Incident" filed in "Incident - Category", required and not enforced. 

The second column is "Incident - Subcategory" (StaticName is "Title") which is not required and not enforced.


In Chrome I receive the following when I put this all together:

POST http://server/departments/Security/internal/_vti_bin/Lists.asmx 500 (Internal Server Error) jquery-1.7.min.js:4 jquery-1.7.min.js:4
  f.extend.ajax jquery-1.7.min.js:4
  $.fn.SPServices jquery.SPServices-0.7.1a.js:1094
  (anonymous function) jquery.SPServices-0.7.1a.js:1380
  e.extend.each jquery-1.7.min.js:2
  e.fn.e.each jquery-1.7.min.js:2
  cascadeDropdown jquery.SPServices-0.7.1a.js:1315
  $.fn.SPServices.SPCascadeDropdowns jquery.SPServices-0.7.1a.js:1298
  (anonymous function) NewForm.aspx:1966
  f.Callbacks.n jquery-1.7.min.js:2
  f.Callbacks.o.fireWith jquery-1.7.min.js:2
  e.extend.ready jquery-1.7.min.js:2
  c.addEventListener.C jquery-1.7.min.js:2
Cascade called NewForm.aspx:1976

Does anyone know why this isn't working? Is it the non-unique values in the child?



Aug 15, 2012 at 4:22 PM

Ok, I have it working now, but I can't figure out why I am having to do this.

The fix is to use the GUID of the list, I can not get it working with the name only which is a bummer but I'll live with it. Might this be a bug of some sort or am I using it wrong?

As a side note, I was having issues with all functions that use the listName not working when using the displayName.

Aug 16, 2012 at 11:07 PM

If you've renamed the list, that can sometimes cause a problem because the list has an internal name as well as a display name, much like columns. The trick is to do the renaming in SharePoint Designer.

If you call GetListCollection, you can see what names the Web Services are expecting.