SPCascadeDropDowns: Help needed

Aug 21, 2012 at 12:53 PM

I need some directions/help on accompolishing the following scenario:

UserA enters some asset details, for which user B will fill additional details. Current setup is 

1. InitiatorDetails: RequestNumber, other fields

2. AssetDetails: RequestNumber(Lookup to List1), PartNo(Single line of text)

3. MovementDetails: RequestNumber(Lookup to List1), PartNo(Lookup to List2)

I have made a custom aspx to show the new item (DVWP) for List3 and added the following code to CEWP.

$(document).ready(function() {
		$().SPServices.SPCascadeDropdowns({
			relationshipList: "MovementDetails",
			relationshipListParentColumn: "RequestNumber",
			relationshipListChildColumn: "PartNo",
			parentColumn: "RequestNumber",
			childColumn: "PartNo",
			listName: "InitiatorDetails",
			debug: true
		});
	});
 

This is not filtering the Part no field, when a request number is selected. Any help would be appreciated.

 

 

Aug 28, 2012 at 11:49 PM

Wanted to bump this topic..   I'm running into a similar issue. 

Below is my code.  Works perfectly fine when added to the newform.aspx page of my list.  But when I dropped a (new item) Dataview WebPart onto a custom aspx page in SPD and added the same code to a content editor, it doesn't work!   Is there an explanation or fix for this?      I have a requirement to add this form to a separate page on the SharePoint site but don't want to go the InfoPath route if I don't need to. 

 

$(document).ready(function(){
        $().SPServices.SPCascadeDropdowns({
        relationshipList: "KPIs",
        relationshipListParentColumn:"Program",
        relationshipListChildColumn:"KPI",
        parentColumn:"Program",
        childColumn:"KPI"
     });
   
});

Coordinator
Sep 11, 2012 at 1:46 PM

The reason a custom form isn't working is that the markup is different from the default List Form Web Part (LFWP). In your customized form, you'll need to make sure that the markup emitted for the columns you want to cascade is the same. Since you're customizing with the DVWP, I'll assume you can figure that out, but let me know if you need to know more.

Sorry for the delay in responding, but I was on vacation.

M.

Sep 11, 2012 at 3:35 PM

Thanks for the reply. I will check that out. The requirement mentioned does not exist anymore. However, I would try this and keep it ready for any future requirements!