This project has moved and is read-only. For the latest updates, please go here.

Chaining selections in cascading lookups

Dec 9, 2011 at 8:45 PM

I recently used SPServices to build cascading lookups: parent as a single lookup, child as multi-lookup (v0.7, worked like a charm).

I got an additional request from the user, to chain selections. Here is how it would work.

1/ User selects Parent 1. Child lookup gets automatically filtered to display Child 1.1, Child 1.2, etc.

2/ User selects Child 1.1

3/ User selects Parent 2. At this point the lookup should list Child 2.1, Child 2.2, etc. on the left, and keep Child 1.1 on the right.

Has anybody done something similar? With the default behavior, the child field is reset and the user loses his/her first selection.

Dec 9, 2011 at 8:53 PM


I'm not sure I understand the scenario you're describing. You *can* chain selections, as in the Country / Region/ State / City example, but I think you're describing somethig different. What do yuo mean by "on the left" and "on the right"?


Dec 9, 2011 at 8:59 PM

I am referring to the two areas of a multiple lookup field. On the left it displays the possible fields, on the right it displays the selected fields.

Right, I am not talking about multiple cascades. There are only two levels, Parent and Child. My user would like to select both Child 1.1 (under Parent 1) and Child 2.1 (under Parent 2).

Dec 9, 2011 at 9:41 PM

Nope, not possible.


Dec 9, 2011 at 10:10 PM

Would it work if I cascade from multiple to multiple lookups? I mean that I would set the parent as a multiple lookup, select Parent 1 and Parent 2, and the child lookup would automatically get filtered to give me all the children of Parent 1 and Parent 2.

Dec 9, 2011 at 10:23 PM
Dec 12, 2011 at 11:29 AM

This is a neat question! I remember several years back I had to build something similar in vanilla javascript! In SharePoint, this could not work as a standard lookup unless all the possible values were in a master list and then the Parent items used the same ID's for each child item. Very messy and really not possible. I guess the question is what the end result of the selections would be. How is that data used? It would not work as a standard lookup, but you could fashion a memo field to act like one. It really depends on what the user wants to do with the selections.