Am I missing something using SPCascadeDropdowns?

Jan 12, 2014 at 5:59 AM
I'm using the following code and I have checked, rechecked and then checked again to make sure the values that I'm using are correct so I'm hoping to just having some different eyes will make the difference.

Using the code below, the first drop-down set doesn't work, it shows all the values in the "SME Category" column regardless of which "Product" is selected, however the second drop-down works exactly as expected having the "SME Topic" options change accordingly to the value selected for "SME Category".

This had been working at one point just fine without me making any changes to the code, but something has gotten messed up somewhere and I can't figure out what. Any help is appreciated.
<script language="javascript" src="/teams/scem/SiteAssets/jQuery-1.8.3.js" type="text/javascript"></script>
<script language="javascript" src="/teams/scem/SiteAssets/jQuery.SPServices-2013.01.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
    $().SPServices.SPCascadeDropdowns({
        relationshipList: "SMELevel1",
        relationshipListParentColumn: "Product",
        relationshipListChildColumn: "Title",
        parentColumn: "Product",
        childColumn: "SME Category",
        matchOnId: true
    });   
    $().SPServices.SPCascadeDropdowns({
        relationshipList: "SMELevel2",
        relationshipListParentColumn: "SMELevel1",
        relationshipListChildColumn: "Title",
        parentColumn: "SME Category",
        childColumn: "SME Topic",
        matchOnId: true
    });   
});
</script>
Jan 12, 2014 at 1:46 PM
Do you see any errors in the Console? Also, can you set the 'debug: true' option on the SPCascadingDropdowns to see if it detects any issues?

/Paul


--
Paul T.

-- Sent from Mobile

Jan 12, 2014 at 5:42 PM
I set debug: true but it doesn't report any errors, nor is there anything that shows up odd or anything beyond the fact that the cascading doesn't work for that field while it does work fine for the other.

Jeff.
Coordinator
Jan 12, 2014 at 7:30 PM
Jeff:

You said that it used to work, but doesn't now. Did anything change in the underlying lists? Did you add items? Delete Items? etc.

M.
Jan 12, 2014 at 8:26 PM
I had thought about that, so I deleted all items that had been added since the last time I am positive it was working (thankfully it is not a production site yet) but that didn't make any difference. Nothing had been deleted since the last time I am positive it was working.

I had thought perhaps something got changed in terms of the feature set for the site, but then that doesn't explain why the second cascade works perfectly.

Jeff.
Coordinator
Jan 12, 2014 at 8:30 PM
There must be some sort of error occurring, some difference in the data, etc.

What if you remove the second cascade? Does the first one work then?

M.
Jan 12, 2014 at 8:47 PM
No - it doesn't. In fact, I have several places where I use this code, and in a couple of those places, only the first cascade is needed so that is the only one present and it doesn't work in those situations either.

Just to be sure I'm thorough, I removed the second cascade from the page I was specifically testing against but it didn't make any difference. I even tried re-ordering the SPCascadeDropdowns() calls to see if it just didn't like it when it was first or something but no dice.

I appreciate all the feedback thus far.

Jeff.
Coordinator
Jan 12, 2014 at 8:55 PM
Well, as Paul and I have suggested, there is probably a script error occurring. Do you know how to use the Developer Tools?

M.
Jan 12, 2014 at 9:09 PM
Unfortunately I'm not well versed in using the developer tools beyond doing something like setting a breakpoint or a watch value. In this case there aren't any unhandled exceptions that are occurring or anything that stands out like that.

Jeff.
Coordinator
Jan 13, 2014 at 11:37 AM
Hmm. It's tough to know what to suggest. What about only including the problem call and removing the matchOnId parameter?

M.