Trying to return distinct values with SPCascadeDropdowns

Jan 10, 2014 at 5:37 PM
Edited Jan 10, 2014 at 5:44 PM
I've got a really simple use case for SPCascadeDropdowns. I'm basically creating a hardware request form that will filter the available servers for request based on Memory, CPU, and Disk space; then allow for multiple server selection based on the choices. Lookups are in place for all 4 columns which reside on the same server master list. Here is the code:

$(document).ready(function() {
$().SPServices.SPCascadeDropdowns({
relationshipList:"OREImport",
relationshipListParentColumn:"CPU",
relationshipListChildColumn:"Physical_x0020_Name",
CAMLQuery:"<Eq><FieldRef Name='Status'/><Value Type='Text'>Available</Value></Eq>",
parentColumn:"CPU",
childColumn:"Server",
debug:true
});
});

Of course, rather than having to scroll through 25 entries of 2GB, 4GB, etc, I want to return only distinct values. Has anyone been able to do this? Any help would be greatly appreciated.
Coordinator
Jan 10, 2014 at 5:49 PM
It sounds like you're cramming all of the relationship data into the one list. It's better DB practice - and will make the function work the way you want it to - if you normalize the data into separate lists. Take a look at the example in the docs using Region, State, etc.

M.