Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Two groups of Parent Child Cascade Columns in a SharePoint List

$
0
0

I have four lookup column in my SharePoint List. Document Type, Document Sub Types, Facility Type and Facility. Document Type is parent of Document Sub Type. Facility Type is parent of Facility. I am following http://www.markrackley.net/2017/03/06/new-improved-cascading-dropdowns-for-sharepoint-classic-forms/ to create two group of lists which are dependent to only their child list. When I click on "Document Type", It works fine and replaces in "Document Sub Types" accordingly. But if I select "Facility Type", then the values in "Document Sub Types" are changed and "Facility" drop down remains unchanged.

<script src="/SiteAssets/jquery-1.10.1.min.js"></script>
        
<script src="/SiteAssets/HillbillyCascade.js"></script>
<script type="text/javascript">

//jQuery.noConflict();




( function ($){


$(document).ready(function(){
//ExecuteOrDelayUntilScriptLoaded(alert("SP Loaded"), "SP.js");


startCascading();
});

function startCascading(){

var cascadeArray = new Array();
var cascadeArray2 = new Array();

cascadeArray2.push({
parentFormField: "Doc Type", /*Display name on form of field from parent list*/
childList: "Doc Sub-Cats", /*List name of child list*/
childLookupField: "Title", /*Internal field name in Child List used in lookup*/
childFormField: "Doc Sub Type", /*Display name on form of the child field*/
parentFieldInChildList: "Category", /*Internal field name in Child List of the parent field*/
firstOptionText: "< Select a Document Sub Type >"
});


cascadeArray.push({
parentFormField: "Facility Type", /*Display name on form of field from parent list*/
childList: "Facility", /*List name of child list*/
childLookupField: "Title", /*Internal field name in Child List used in lookup*/
childFormField: "Facility", /*Display name on form of the child field*/
parentFieldInChildList: "FacilityTypeList", /*Internal field name in Child List of the parent field*/
firstOptionText: "< Select a Facility >"
});


$().HillbillyCascade(cascadeArray);
$().HillbillyCascade(cascadeArray2);

}
}(jQuery));




</script>


Muhammad Masood


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>