Forum Discussion
Relationships between two lookup type fields
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!
you may have been using the SPServices http://spservices.codeplex.com/ that were created by MarcDAnderson
- Dean_GrossSilver Contributor
you may have been using the SPServices http://spservices.codeplex.com/ that were created by MarcDAnderson
- María José PedreiraBrass Contributor
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!- Take a look at the following JSLINK samples:
- https://kogzee.wordpress.com/2014/11/11/cascading-dropdowns-on-large-lists-in-sharepoint-using-jslink/
- https://github.com/SharePoint/PnP/tree/master/Samples/Branding.JSLink
- 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- María José PedreiraBrass Contributor
Hi jcgonzalezmartin,
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
- Correct! And in this case, go for JSLINK!!