0

I have Two Lists

List1 {College Name, Department Name}

And List2 {Student Name , College (as lookup field link with College Name on List1) , Department(as lookup field link with Department Name on List1)}

My requirement is creating NewForm.aspx for the List2 , but if I want to show on the ComboBox of lookup field (Department) Only Items with condition College= College.selected value

Is There anyway To do this By SharePoint Designer ?

4

3 Answers 3

1

Edit the page in browser and add a Script Editor Webpart. Then

Next on page load bind change event of the college dropdown box as below

    //Replace C1 with the title of the combo box.
    $('[title="C1"]').bind("change", function() {
        bindDepartments($(this).val());
    });

    function bindDepartments(college) {
        //Replace C2 with the title of the department combo box
        $('[title="C2"]').empty();
        alert(college);
        //Load department using REST(filter) or JSOM (CAML)
    }
2
  • Is There any vedio learn how to do that please Commented Aug 9, 2016 at 15:40
  • You can just use google and use the words i put it on comment Commented Aug 9, 2016 at 15:41
1

Look for SPServices on Codeplex.

https://spservices.codeplex.com/

The SPCascadeDropdowns function lets you set up cascading dropdowns on SharePoint forms. What this means is that you can enforce hierarchical relationships between column values. The function uses the GetListItems operation of the Lists Web Service to refresh the allowable values based on relationships which are maintained in reference lists. By implementing this function, there are no coding requirements to manage the hierarchical relationships (once it is in place) and you can let your users manage the content in the reference lists.

https://spservices.codeplex.com/wikipage?title=$().SPServices.SPCascadeDropdowns&referringTitle=Documentation

1
  • Should you provide more details with example Commented Aug 9, 2016 at 17:07
0

You can achieve this using InfoPath

  • Open your list and from the above ribbon, select customizes it via InfoPath.

  • In the InfoPath form designer right click on Project field and click on Drop-Down list properties option.

  • On the newly opened dialog click Add button

  • You need to create new connection to receive data from Projects list. Select Create a new connection to: Receive Data. Click Next >..
  • Select SharePoint library or list as your source. Click Next .
  • Type in the URL of your SharePoint site. Click Next >.
  • Select Projects list you create before. Click Next >.
  • From the fields list, select the following fields: Title, and Active. Select to sort by Title. Click Next.
  • Click Next button a few times to finalize this wizard. Once completed you will be taken back to properties dialog. Select ID field as value field. Click the button Next to Entries field, then Select a Field or Group dialog should appear.
  • On the Select a Field or Group dialog click on Filter Data… button
  • On the filter dialog, create a filter as shown on picture below. This will force drop down to load only active projects.

    • Check the details steps here
    • Check also this vedio

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.