0

I am very new to SharePoint. I was trying for cascading dropdown where I have tested the scenario below:

Activity List: Bike,Cycle

Sub Activity List:Red,Green,Yellow

When I select Bike in "Activity List", I should only see Red in the "Sub Activity List" and similarly on Selecting Cycle,I should see Green and Yellow but not red.

I have used the below script:

<script src="https://site name/jquery-3.2.1.min"></script>  
<script src="https://sitename/jquery.SPServices.min.js"></script>  
<script type="text/javascript">  
$(document).ready(function ()  
{  
    $().SPServices.SPCascadeDropdowns(  
    {  
        relationshipList: "Sub Activity List",  
        relationshipListParentColumn: "Activity List",  
        relationshipListChildColumn: "Title",  
        parentColumn: "Activity List",  
        childColumn: "Sub Activity List",  
        debug: true  
    });  
});  
</script>

I have downloaded jquery-3.2.1.min.js and jquery.SPServices.min.js and have put in Sitecontents.

But I am not able to get the expected output. Can anyone please tell me what wrong I am doing in this.

4
  • If you have the script references (jquery and SPServices js-files) in your Site Contents, they should be referred exactly as their path is at the start of the script. So, <script src="https://site name/Site Contents/jquery-3.2.1.min"> and <script src="https://sitename/Site Contents/jquery.SPServices.min.js">.
    – moe
    Jan 11, 2018 at 9:28
  • I have already given the exact path name. But due to security purpose I haven't given the original path. I have tried adding the .js file in JSLink under Miscellaneous. Along with this I have tried uploading under content editor and script editor as well. But didn't find any luck.
    – user73075
    Jan 11, 2018 at 10:19
  • First things first... if you put an alert() in your ready function, do you see it? If you load your page with the F12 debugger on in IE, do you get any errors on the console tab?
    – mannaggia
    Jan 11, 2018 at 11:51
  • No I didn't get any errors,the code is working fine in that.Still it is not executing.
    – user73075
    Jan 12, 2018 at 7:05

2 Answers 2

1

You need to use the internal names of fields in the lookup - and external (displayed) names for those fields in the html of the page. see instructions carefully on this.

1
  • Could you please let me know from where should I get those instructions?
    – user73075
    Jan 12, 2018 at 7:12
-1

You are not setting it up correctly. I have a link to a good article about how to do them with SPServices. Please refer to my previous post.

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.