SPSetMultiSelectSizes causes SPCascadeDropdowns error "childColumn not found on page" v0.7.1a and SPSetMultiSelectSizes disables control v0.7.2

Sep 27, 2012 at 9:17 PM
Edited Sep 27, 2012 at 9:20 PM

After much searching of the discussions and issue tracker, my issue has the same symptom as the "Cascading drop down lists in another language"

Today I created 3 new lists and mirrored the demo page example I found under the documentation page for SPCascadeDropdowns where Marc cascades from DropDown REGION to DropDown STATE to MultiSelect CITY. My lists and NewForm.aspx do the same from DropDown Fail Point Category to DropDown Fail Reason to MultiSelect Fail Details.

When I make a call to SPSetMultiSelectSizes and then to SPCascadeDropdowns, for the same column name on the form, I get the error pasted below (I have debug enabled).

Error in function
SPServices.SPCascadeDropdowns
Parameter
childColumn: Fail Details
Message
Column not found on page

When called independently, SPSetMultiSelectSizes and SPCascadeDropdowns work as advertised.

I tried several versions of SPServices and jQuery. I first found this using jquery.SPServices-0.7.1a.min.js and jquery-1.7.2.min.js.

Here is my code:

	$().SPServices.SPSetMultiSelectSizes({
		multiSelectColumn: "Fail Details",
	});

	// Set up the cascade from category to reason
	$().SPServices.SPCascadeDropdowns({
		relationshipList: "PI Fail Reasons",
		relationshipListParentColumn: "FailPointCategory",
		relationshipListChildColumn: "Title",
		relationshipListSortColumn: "Title",
		parentColumn: "Fail Point Category",
		childColumn: "Fail Reason",
		debug: true
	});

	// Set up the cascade from reason to details
	$().SPServices.SPCascadeDropdowns({
		relationshipList: "PI Fail Details",
		relationshipListParentColumn: "FailReason",
		relationshipListChildColumn: "Title",
		relationshipListSortColumn: "Title",
		parentColumn: "Fail Reason",
		childColumn: "Fail Details",
		debug: true
	});

Note: Yes. My internal field names do not match my display names. I create the columns without spaces first, then edit and add spaces. I hate having to code _x20_ later on ;)

When I tried my code using jQuery 1.8.x and SPServices 0.7.2 and the code produces no error popup and the MultiSelect control does resize properly but is becomes disabled. Selecting items in the cascading drop downs did not enable the field. I found the same result when I commented out the calls to SPCascadeDropdowns() and only called SPSetMultiSelectSizes.

Recap:

jQuery 1.7.2 & SPServices 0.7.1a

WORKS: Call to only SPSetMultiSelectSizes()
WORKS: Calls to only SPCascadeDropdowns()
FAILS: Calls to both SPSetMultiSelectSizes() and SPCascadeDropdowns()
SYMPTOM: SPCascadeDropdowns() produces the error "Column not found on page"

jQuery 1.8.2 & SPServices 0.7.2

FAILS: Call to only SPSetMultiSelectSizes()
WORKS: Calls to only SPCascadeDropdowns()
FAILS: Calls to both SPSetMultiSelectSizes() and SPCascadeDropdowns()
SYMPTOM: MultiSelect control resizes properly but becomes disabled

The NewForm.aspx is OOB as of today with my new lists. I've kept this as simple as I could. I'm on a US English language SharePoint 2007 Farm installation, top of a site collection. The client is IE 7.0.5730.13

Coordinator
Oct 2, 2012 at 12:20 PM
Edited Oct 2, 2012 at 12:29 PM

Chris:

Sorry I didn't get back to you sooner. Have you tried simply switching the call to SPSetMultiSelectSizes after the calls to SPCascadeDropdowns? Also, I notice that you have a trailing comma on the line:

multiSelectColumn: "Fail Details",

That will cause an error and the calls to SPSetMultiSelectSizes won't happen.

M.

Oct 2, 2012 at 4:31 PM

My bad with the trailing comma. I had it there because I tried adding DEBUG to the SPSetMultiSelectSizes call and copied/pasted in error here. The actual code in play had no trailing comma.

Adding the SPSetMultiSelectSizes call AFTER SPCascadeDropdowns: The multiSelect form contronl is left in a disabled state and DOES NOT resize.

Placing the SPSetMultiSelectSizes call BEFORE SPCascadeDropdowns: The multiSelect form contronl is left in a disabled state but DOES resize correctly.

This page is the out-of-box MOSS 2007 list new item form and the only non-SharePoint scripts on the page are:

<script type="text/javascript" src="/sites/PostCloseQuality/scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/sites/PostCloseQuality/scripts/jquery.SPServices-0.7.2.min.js"></script>

And by disabled, I mean grayed-out, can't click inside of and the SPCascadeDropdowns does not populate the picker. It is the "possible values" side that is left disabled. The "selected values" side is not disabled.

Client is IE 7.0.5730.13

If you think it'd help, I'd be happy to PM you a "view source" or aspx source.

Oct 2, 2012 at 4:40 PM

UPDATE:

I did a quick test of placing the SPSetMultiSelectSizes call BEFORE SPCascadeDropdowns and it works...

IN FIREFOX 15.0.1

We are limited to using IE 7 within our corporate environment.

Coordinator
Oct 3, 2012 at 1:56 PM

I don't have IE7 anywhere to test with. If you can figure out where any error is occurring with some debugging, perhaps we can come up with a fix for you.

M.