3

I need help with SPServices.SPCascadeDropdowns. I need to create 3 level cascade dropdown fields. But I have some problems with it, so I need help.

Here are my lists. First lists is PrimaryDomains,

enter image description here

Next list is SecondaryDomains

enter image description here

Third one is SubDomains: enter image description here

And main list is IT. First two fields are working, but on third field it doesn't. Here is picture and error on custom form. enter image description here

Here is my code from New custom form from SharePoint Designer

<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/0.7.1a/jquery.SPServices-0.7.1a.min.js"></script>
<script type="text/javascript">

 $(document).ready(function() {
 $().SPServices.SPCascadeDropdowns({
 relationshipList: "SecondaryDomains",
 relationshipListParentColumn: "PrimaryDomain",
 relationshipListChildColumn: "Title",
 relationshipListSortColumn: "Title",
 parentColumn: "Primary_Domain",
 childColumn: "Secondary_Domain",
 debug: true
 });

$().SPServices.SPCascadeDropdowns({
 relationshipList: "SubDomains",
 relationshipListParentColumn: "SecondaryDomain",
 relationshipListChildColumn: "Title",
 parentColumn: "Secondary_Domain",
 childColumn: "Sub_Domain ",
 debug: true
  });
});
</script>

Also maybe I need to say that I will have more than 20 items in list SubDomains.

Thanks!

1
  • Please check the the Spelling of SecondaryDomain, in your screen shot it Shows inside SubDomains list ,for column SecondaryDomian and in your script it shows relationshipListParentColumn: "SecondaryDomain Oct 18, 2016 at 9:36

2 Answers 2

3

You have made some spelling mistakes,like in your screen shot In SubDomains list display name for column SecondaryDomian In your script it shows SecondaryDomain, change column value use bwlow script

<script src="http://code.jquery.com/jquery-latest.js"   
type="text/javascript"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/0.7.1a/jquery.SPServices-0.7.1a.min.js"></script>
<script type="text/javascript">

$(document).ready(function() {
$().SPServices.SPCascadeDropdowns({
relationshipList: "SecondaryDomains",
relationshipListParentColumn: "PrimaryDomain",
relationshipListChildColumn: "Title",
relationshipListSortColumn: "Title",
parentColumn: "Primary_Domain",
childColumn: "Secondary_Domain",
debug: true
});

$().SPServices.SPCascadeDropdowns({
relationshipList: "SubDomains",
relationshipListParentColumn: "SecondaryDomian",
relationshipListChildColumn: "Title",
parentColumn: "Secondary_Domain",
childColumn: "Sub_Domain ",
debug: true
});
});
</script>
4
  • Thanks, I correct that spelling mistake, but still the same error Oct 18, 2016 at 10:39
  • that means there is something misplaced in your sript. Once again go through your script, find out is their ant spelling mistake or check you have place all columns name right Oct 18, 2016 at 10:58
  • I did it, I made a list again and now everything is working, thanks a lot Oct 18, 2016 at 11:23
  • great efforts ,Sounds good. finally you made it. Oct 18, 2016 at 11:39
2

You have made some spelling mistakes. In the Scripts you're using

relationshipListParentColumn: "SecondaryDomian",

but your ParentColumns exact name is "SecondaryDomian".

Use the scripts as

$(document).ready(function() {
 $().SPServices.SPCascadeDropdowns({
 relationshipList: "SecondaryDomains",
 relationshipListParentColumn: "PrimaryDomain",
 relationshipListChildColumn: "Title",
 relationshipListSortColumn: "Title",
 parentColumn: "Primary_Domain",
 childColumn: "Secondary_Domain",
 debug: true
 });

$().SPServices.SPCascadeDropdowns({
 relationshipList: "SubDomains",
 relationshipListParentColumn: "SecondaryDomian",
 relationshipListChildColumn: "Title",
 parentColumn: "Secondary_Domain",
 childColumn: "Sub_Domain ",
 debug: true
  });
});

Change the script not the list field name.

2
  • I did it, I made a list again and now everything is working, thanks a lot Oct 18, 2016 at 11:23
  • Great. Please mark it answered if it helped. Oct 18, 2016 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.