One Parent and multiple Children

May 7, 2012 at 10:38 PM

In all the examples I have seen you have a two deep cascade drop down, is there a way to make it one one deep?

Example:

Team List (Lists the Team)
-- Team 1 (List of names)
-- Team 2 (List of names)
-- Team 3 (List of names)
-- Team 4 (List of names)
-- Team 5 (List of names)

So when you are entering a new item in, you would have two drop downs. One that askes for which Team you want, then it populates all the names of those in the team you selected.

 

Thanks

Coordinator
May 8, 2012 at 3:38 AM

You can have as many cascades as you need, from 1-n (though the more there are, the slower it will  be).

M.

May 8, 2012 at 4:02 AM
So would I just create 2 Lists?

So in the Team List would I have two columns: Title and Team?

Title:
Alpha
Bravo
Charlie

Team:
Alpha
Bravo
Charlie


Then a new list for the teams:

Title:
John
Sally
Bob

Team:
Alpha
Alpha
Charlie

Then would I just use the following?

<script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.4.2.js"></script> <script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery.SPServices-0.5.7.min.js"></script> <script language="javascript" type="text/javascript"> $(document).ready(function() { $().SPServices.SPCascadeDropdowns({ relationshipList: "Team", relationshipListParentColumn: "Team List", relationshipListChildColumn: "Title", parentColumn: "Team List", childColumn: "Team", debug: true }); }); </script>
CAMLQuery: "<Eq><FieldRef Name='Status'/><Value Type='Text'>Active</Value></Eq>"
Coordinator
May 8, 2012 at 11:24 AM

The first list would only have the Teams. You can use the Title for the team name. The second list would be what you show, with Team as a Lookup column into Teams.Title.

My suggestion is to just set it up and get it working. You should use the up-to-date versions of both jQuery and SPServices.

M.