1

I have 4 lists:

  1. Category
  2. Subcategory
  3. Detail
  4. IT Service Request

Column Details:

  1. Category list has one column: "Title"
  2. Subcategory list has two columns: "Title" and a lookup column named "Category"
  3. Detail list has two columns: "Title" and a lookup column named "Subcategory".
  4. IT Service Request list has multiple columns: Assigned On/Assigned To/Requester name, etc.

Here is my script:

<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://cdnjs.cloudfare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$().SPServices.SPCascadeDropdowns({
relationshipList: "Subcategory",
    relationshipListParentColumn: "Category",
    relationshipListChildColumn: "Title",
    parentColumn: "Category",
    childColumn: "Subcategory",
    debug: true
})
$().SPServices.SPCascadeDropdowns({
    relationshipList: "Detail", 
    relationshipListParentColumn: "Subcategory", 
    relationshipListChildColumn: "Title",
    parentColumn: "Subcategory",
    childColumn: "Detail",
    debug: true
})

In my "IT Service Request" list, I added it into the source in a content editor in Newform.aspx. At first, this worked just fine. But something happened and all of a sudden it's not working at all. I tested JQuery and it is loading. But my cascading dropdown isn't working whatsoever.

I'm pulling my hair out trying to figure out what's wrong. Help!

I'm using SharePoint Enterprise 2016. Thank you!

3
  • 1
    If that is the exact code, you have a syntax error in loading your SPServices. Also, you should save the JS file locally instead of doing an external call to them.
    – lazoDev
    Nov 7, 2018 at 14:09
  • Yeah, I just haven't gotten there yet. It's on Dev so I'm just trying to make sure I can get it to work first and foremost. What's the syntax error?
    – SGRZYM
    Nov 7, 2018 at 14:16
  • I noticed what you're saying. The script that I put in was actually correct and didn't have the extra > in the beginning. Still having issues.
    – SGRZYM
    Nov 7, 2018 at 14:52

1 Answer 1

0

The "https://cdnjs.cloudfare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices.min.js" is not exists.

Modify the code as below to make it works.

<script src="//code.jquery.com/jquery-1.10.1.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices-2014.02.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
    $().SPServices.SPCascadeDropdowns({
        relationshipList: "Subcategory",
        relationshipListParentColumn: "Category",
        relationshipListChildColumn: "Title",
        parentColumn: "Category",
        childColumn: "Subcategory",
        debug: true
    });
    $().SPServices.SPCascadeDropdowns({
        relationshipList: "Detail", 
        relationshipListParentColumn: "Subcategory", 
        relationshipListChildColumn: "Title",
        parentColumn: "Subcategory",
        childColumn: "Detail",
        debug: true
    });
})
</script>

enter image description here

I suggest you download the jquery-1.10.1.min.js and jquery.SPServices-2014.02.min.js files and upload it to Site Assets library, then reference the files from the library.

9
  • I updated the script. Then, I did update to site assets library and referenced from the library. No dice for both. I've cleared cache, too. Any other suggestions?
    – SGRZYM
    Nov 8, 2018 at 13:57
  • The reference like below: <script src="/sites/team/SiteAssets/jquery-1.10.1.min.js" type="text/javascript"></script> <script src="/sites/team/SiteAssets/jquery.SPServices-2014.02.min.js" type="text/javascript"></script>
    – LZ_MSFT
    Nov 9, 2018 at 1:33
  • Correct. It's exactly the same. I've also tried using this on other sites I've created and none of them at working correctly.
    – SGRZYM
    Nov 9, 2018 at 14:29
  • Try to use the Full URL of the file, like : abc/sites/team/SiteAssets/jquery-1.10.1.min.js.
    – LZ_MSFT
    Nov 12, 2018 at 1:17
  • Tried, also didn't work.
    – SGRZYM
    Nov 13, 2018 at 13:18

Your Answer

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

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