bad caml query results in misleading error message from debug option

Mar 27, 2014 at 2:05 AM
Edited Mar 27, 2014 at 2:08 AM
It is a good thing to always use debug mode to get started.

In both SPFilterDropdown and SPCascadeDropdowns, using an incorrect CAML query resulted in a misleading debug output error message that either the parent or child column was not found in the relationship list. Correcting the CAMLQuery to have the correct spelling for the FieldRef name used in a filter resulted in both of the SP functions working correctly.

I believe that I'm using jquery-1.7.1.min with jquery.SPServices-0.7.2.min. I only tried this in an IE11/Windows 7/WSS 2007 environment. The error message looked something like this:
Error in function
SPServices.SPCascadeDropdowns
Parameter
relationshipListParentColumn: col1 or
relationshipListChildColumn: col2
Message
Not found in relationshipList Job List

This started me off down the path of checking that I had used the correct static names for the columns, which is usually where I find the correction. But not this time. This time in the
CAMLQuery string
"...<FieldRef Name='status' />..." 
the name needed to be
"...<FieldRef Name='Status' />..."
Coordinator
Mar 27, 2014 at 1:08 PM
The error messages that come back from the Web Services calls can be particularly non-specific. Looks like I'm missing a nuance in what is returned, though. I'd appreciate it if you could try 2014.01 just to see if you get the same misleading error. If so, I can add an issue to the Issue Tracker to look into it for the next release.

Thanks,
M.
Mar 27, 2014 at 2:10 PM

Marc,

I will give this a try; however, it might take a few days to find the right time to do this, since this is a production server. Thank you so much for SPServices.

Mark

301-642-1143 mobile

Jun 20, 2014 at 2:01 PM
Same error message for 2014.01. Sorry about the long turn around time--could have shortened it by just changing the SP Services reference on one page.