SOLVED

Relationships between two lookup type fields

%3CLINGO-SUB%20id%3D%22lingo-sub-91452%22%20slang%3D%22en-US%22%3ERelationships%20between%20two%20lookup%20type%20fields%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-91452%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20create%20a%20content%20type%20with%20two%20Lookup%20type%20fields.%3C%2FP%3E%3CP%3EI%20dont%20mind%20if%20the%20first%20field%20is%20a%20Choice%20type%20or%20Lookup%20type.%20But%20the%20second%20one%20I%20believe%20must%20be%20a%20Lookup%20field).%3CBR%20%2F%3EBoth%20fields%20must%20be%20related.%3CBR%20%2F%3EAfter%20select%20a%20value%20for%20the%20first%20one%20(for%20example%20a%20Continent)%2C%20the%20second%20one%20must%20show%20only%20items%20filtered%20by%20the%20previous%20choice%20(for%20example%2C%20the%20countries%20for%20the%20continent%20selected).%20How%20can%20I%20do%20that%3F%3C%2FP%3E%3CP%3EI%20remember%20in%20a%20previous%20sharepoint%20version%20(2010%20Foundation...%2C%20I'm%20not%20sure)%20I%20did%20it%2C%20but%20now%20I'm%20missing%20a%20field%20type%20in%20recent%20sharepoint%20versions.%20Thank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-91839%22%20slang%3D%22en-US%22%3ERe%3A%20Relationships%20between%20two%20lookup%20type%20fields%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-91839%22%20slang%3D%22en-US%22%3ETake%20a%20look%20at%20the%20following%20JSLINK%20samples%3A%3CBR%20%2F%3E-%20%3CA%20href%3D%22https%3A%2F%2Fkogzee.wordpress.com%2F2014%2F11%2F11%2Fcascading-dropdowns-on-large-lists-in-sharepoint-using-jslink%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fkogzee.wordpress.com%2F2014%2F11%2F11%2Fcascading-dropdowns-on-large-lists-in-sharepoint-using-jslink%2F%3C%2FA%3E%3CBR%20%2F%3E-%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2FPnP%2Ftree%2Fmaster%2FSamples%2FBranding.JSLink%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FSharePoint%2FPnP%2Ftree%2Fmaster%2FSamples%2FBranding.JSLink%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-91794%22%20slang%3D%22en-US%22%3ERe%3A%20Relationships%20between%20two%20lookup%20type%20fields%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-91794%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1096%22%20target%3D%22_blank%22%3E%40Dean%20Gross%3C%2FA%3E%2C%3C%2FP%3E%3CP%3ESpServices%20is%20great!%20Thank%20you%20for%20the%20idea.%20I%20followed%20this%20link%20(%3CA%20href%3D%22https%3A%2F%2Fwww.codeproject.com%2FTips%2F758909%2FTwo-Level-Cascading-Drop-Down-in-SharePoint-using%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.codeproject.com%2FTips%2F758909%2FTwo-Level-Cascading-Drop-Down-in-SharePoint-using%3C%2FA%3E)%20and%20for%20a%20list%20runs%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-91494%22%20slang%3D%22en-US%22%3ERe%3A%20Relationships%20between%20two%20lookup%20type%20fields%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-91494%22%20slang%3D%22en-US%22%3E%3CP%3Eyou%20may%20have%20been%20using%20the%20SPServices%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fspservices.codeplex.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fspservices.codeplex.com%2F%3C%2FA%3E%20that%20were%20created%20by%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F83%22%20target%3D%22_blank%22%3E%40Marc%20Anderson%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-91471%22%20slang%3D%22en-US%22%3ERe%3A%20Relationships%20between%20two%20lookup%20type%20fields%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-91471%22%20slang%3D%22en-US%22%3ECorrect!%20And%20in%20this%20case%2C%20go%20for%20JSLINK!!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-91470%22%20slang%3D%22en-US%22%3ERe%3A%20Relationships%20between%20two%20lookup%20type%20fields%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-91470%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F60%22%20target%3D%22_blank%22%3E%40Juan%20Carlos%20Gonz%C3%A1lez%20Mart%C3%ADn%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EI%20forgot%20%26nbsp%3B%20to%20tag%20my%20question.%20I'm%20working%20with%20on-premise%202016...%20%26nbsp%3BI%20suposse%20that%20I'll%20have%20to%20write%20code%20because%20there%20is%20no%20an%20OOTB%20solution%2C%20won't%20I%3F%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-91462%22%20slang%3D%22en-US%22%3ERe%3A%20Relationships%20between%20two%20lookup%20type%20fields%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-91462%22%20slang%3D%22en-US%22%3ECascade%20Lookups%20has%20not%20been%20there%20in%20any%20SharePoint%20version%20%5E-%5E%20You%20need%20to%20implement%20it%20by%20doing%20some%20code%20on%20the%20client%20side...is%20this%20SPO%3F%20If%20yes%2C%20then%20you%20have%20two%20scenarios%20here%3A%3CBR%20%2F%3E(1)%20For%20classic%20lists%2Fdocument%20libraries%20you%20can%20have%20this%20functionality%20by%20means%20of%20JavaScript%20code%20injected%20in%20some%20way%20(JSLINK%20is%20one%20of%20the%20possibilities%20you%20have)%20in%20the%20client%20side%20of%20your%20list%20%2F%20document%20libraries%20forms%3CBR%20%2F%3E(2)%20For%20modern%20SPO%20lists%20%2F%20document%20libraries%20you%20have%20the%20SPFx%20Extensions%20that%20are%20currently%20in%20preview%3C%2FLINGO-BODY%3E
Highlighted
Contributor

I need create a content type with two Lookup type fields.

I dont mind if the first field is a Choice type or Lookup type. But the second one I believe must be a Lookup field).
Both fields must be related.
After select a value for the first one (for example a Continent), the second one must show only items filtered by the previous choice (for example, the countries for the continent selected). How can I do that?

I remember in a previous sharepoint version (2010 Foundation..., I'm not sure) I did it, but now I'm missing a field type in recent sharepoint versions. Thank you!

6 Replies
Highlighted
Cascade Lookups has not been there in any SharePoint version ^-^ You need to implement it by doing some code on the client side...is this SPO? If yes, then you have two scenarios here:
(1) For classic lists/document libraries you can have this functionality by means of JavaScript code injected in some way (JSLINK is one of the possibilities you have) in the client side of your list / document libraries forms
(2) For modern SPO lists / document libraries you have the SPFx Extensions that are currently in preview
Highlighted

Hi @Juan Carlos González Martín,

I forgot   to tag my question. I'm working with on-premise 2016...  I suposse that I'll have to write code because there is no an OOTB solution, won't I?

Thanks

Highlighted
Correct! And in this case, go for JSLINK!!
Highlighted
Best Response confirmed by María José Pedreira (Contributor)
Solution

you may have been using the SPServices http://spservices.codeplex.com/ that were created by @Marc Anderson 

Highlighted

Hi @Dean Gross,

SpServices is great! Thank you for the idea. I followed this link (https://www.codeproject.com/Tips/758909/Two-Level-Cascading-Drop-Down-in-SharePoint-using) and for a list runs well.

 


Thank you!