0

In sp 2007, I have used jquery to do the cascade. But now I hear sp 2010 provides cascaded lookup. I have 3 level to drill down (Country > State > City). Is/are there any good instruction on how to implement cascaded lookup? All the lists have been created with parent-child relation.

Eric Alexander
  • 43,293
  • 10
  • 53
  • 93
Roxanne
  • 401
  • 1
  • 11
  • 19

2 Answers2

4

Have a look at the $().SPServices.SPCascadeDropdowns function within SPServices.

webdes03
  • 5,908
  • 1
  • 20
  • 23
  • @That's Marc jQuery stuff right? which I used in SP 2007. Now that microsoft has a way to implement cascaded lookup i rather use that. I am tired of maintaining codeplex code + all the 3rd party stuff we have. – Roxanne May 19 '11 at 14:27
  • CascadeDropdowns works in both versions. You shouldn't have to change anything if you've already implemented it in 2007. – Eric Alexander May 19 '11 at 14:33
  • Roxanne, The relational behavior you're describing in 2010 is limited to cascading delete, so if I delete my parent record I can set it up to automatically remove all of the child records of that record. You also have the ability to bring in multiple fields from a lookup, but it's not a cascade. The only way to cascade in a form is through UI changes such as using SPServices, you'd be doing the same thing as you did in 2007. There's some "for purchase" bolt-ons that make it "easier", but SPServices is most likely still your best bet. – webdes03 May 19 '11 at 14:34
  • Also (was out of characters in my previous comment), there's a good blog post here which explains the SP2010 relational stuff pretty well: http://www.zimmergren.net/archive/2010/01/05/sp-2010-how-to-relational-lists-in-sharepoint-2010.aspx – webdes03 May 19 '11 at 14:35
  • Also, you should be able to do the cascade drop downs by modifying the forms in InfoPath. I don't recall being able to do cascade dropdowns through the Sharepoint UI in 2010. – Eric Alexander May 19 '11 at 14:43
  • I got the point cascade drop on edit form is different than enforce integrity between 2 lists.
  • If I have to use the same method that I used in SP 2007 (with another company) then I can do that.
  • I dont know why I made an assumption that MS now supports or give you cascade dropdown option for editform.
  • I will probably go with Marc's spservice to implement jQuery as it not as tightly coupled as Jose's solution (found here: http://blogs.solidq.com/sharepoint/Post.aspx?ID=86&title=Filtered+Lookup+Columns+for+Cascading+Dropdowns+in+SharePoint+2010+using+JavaScript+Client+Object+Model)
  • – Roxanne May 19 '11 at 14:56
  • 1
    Roxanne: Always happy to answer questions about SPServices over at http://spservices.codeplex.com. M. – Marc D Anderson May 19 '11 at 17:32