Want to create cascading dropdown in SharePoint. I have created 2 list department and employee and matched item using lookup. Department has 6 items and employees has 70 items.
So, how to create dropdown list for these two columns?
Want to create cascading dropdown in SharePoint. I have created 2 list department and employee and matched item using lookup. Department has 6 items and employees has 70 items.
So, how to create dropdown list for these two columns?
You can use SPServices to achieve this:
https://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices.SPCascadeDropdowns
$().SPServices.SPCascadeDropdowns({
relationshipWebURL: "",
relationshipList: "",
relationshipListParentColumn: "",
relationshipListChildColumn: "",
relationshipListSortColumn: "",
parentColumn: "",
childColumn: "",
CAMLQuery: "",
CAMLQueryOptions: "<QueryOptions> <IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns></QueryOptions>",
listName: $().SPServices.SPListNameFromUrl(),
promptText: "",
simpleChild: false, // Added in v0.6.2
selectSingleOption: false, // Added in v0.6.2
matchOnId: false, // Added in v0.7.1
completefunc: null,
debug: false
});