Cascade "pre filter" ?

Apr 2, 2014 at 6:37 PM
I am building a list with 500 molds and 500 gages, the cascading drop downs work great for the molds, but now I am ready to add the gages, I can use the same drop downs and just add the records, but the results in the cascading drop downs will double (showing nearly 40 selections to choose from)

Is there a way for me to filter the cascades before they load, to only show Mold or Gages depending on a choice selection in the form?

Ie at the top of the form have a choice selection for GAGE or Mold, then use the other two cascades to finish filtering ?

here is my existing code:
<script src="/sites/pandsq/tag/SiteAssets/jquery-1.11.0.min.js" type="text/javascript"></script><script src="/sites/pandsq/tag/SiteAssets/jquery.SPServices-2014.01.js" type="text/javascript"></script><script type="text/javascript">



//Gets Program Selection for later use
$(document).ready(function(){
    $().SPServices.SPCascadeDropdowns({
        relationshipList: "CorePrograms",
        relationshipListParentColumn: "Title",
        relationshipListChildColumn: "Program",
        parentColumn: "Title",
        childColumn: "Program",
    });  


//Filters commodity by program selection above
$(document).ready(function(){
    $().SPServices.SPCascadeDropdowns({
        relationshipList: "Commodity",
        relationshipListParentColumn: "Program",
        relationshipListChildColumn: "Procom",
        parentColumn: "Program",
        childColumn: "Commodity",
    });  



//filters description by commodity
$(document).ready(function(){
    $().SPServices.SPCascadeDropdowns({
        relationshipList: "ALL-Tools2",
        relationshipListParentColumn: "Procom1",
        relationshipListChildColumn: "Tool_Description",
        parentColumn: "Commodity",
        childColumn: "Description",
        simpleChild: true,
            debug:true,
    });  
   });
     });  
});</script>
Apr 2, 2014 at 6:47 PM
Edited Apr 2, 2014 at 7:52 PM
Is it possible to save the scripting to a file, and then depending on the choice selection at the top of the form, use either script A or script B? (script A for molds and Script B for gages)

Then have different cascade for each script?

Or maybe two different cascades as functions, and depending on the choice selection at the top of the form, an IF statement in js that picks the matching function (cascade) ?

Obviously I am quite new to this, any help would be greatly appreciated !