This project has moved and is read-only. For the latest updates, please go here.

CAMLQuery: Recursive, but without Folder Names

May 31, 2012 at 12:17 PM
Edited May 31, 2012 at 12:18 PM

Hey, ive got a second question, but i dont know where the problem ist.

Im using SPCascadeDropdowns and the Script is getting the Child and Parent Entries from another list.

Iam using this:

CAMLQueryOptions: "<QueryOptions><ViewAttributes Scope='RecursiveAll'/></QueryOptions>"


for getting everything in this list within the folders, but now i get the folder names too, so i added a CAMLQuery:

<Neq><FieldRef Name='FSObjType' /> <Value Type='Integer'>1</Value></Neq> 

And i already tried this version:

   <Neq><FieldRef Name='ContenType' /> <Value Type='Text'>Folder</Value></Neq> 

And my whole CAMLQuery looks like this:


		<FieldRef Name ='Title'/>
					<FieldRef Name='Brand'/>
						<Value Type='Text'>
					<FieldRef Name='ContentType' />
					<Value Type='Text'>
				<FieldRef Name='Title' />

But its not working at all, everytime he shows me the folder names..

Thanks for your help!

May 31, 2012 at 12:52 PM
Edited May 31, 2012 at 12:56 PM


Did you try this?

<Eq><FieldRef Name='FSObjType' /><Value Type='Lookup'>0</Value></Eq>

or conversely:

<Neq><FieldRef Name='FSObjType' /><Value Type='Lookup'>1</Value></Neq>


May 31, 2012 at 12:59 PM

Tanks for your answer, first i didnt try this both versions, but they aren't working either.



Am i getting this right, because my collegue said at opening the site the list items (parent and child) are fetched without the SpService Javascript. But this cant be true, right? Because then Recursive wouldn't work at opening, either?

May 31, 2012 at 1:39 PM

I'm not sure I understand...


May 31, 2012 at 1:42 PM

When loading the page, in my example some formular which uses spservices CascadeDropdowns, the parent and the child dropdowns are filled with the results from camlquery, not with some sharepoint services themself, right? So i should change the CamlQuery to get the results i want ( ex. Recursive), and without the folder names in this dropdown menu..


May 31, 2012 at 1:51 PM

I totally missed that you said SPCascadeDropdowns above; I thought you were working with GetListItems. Can you post back your entire call so that I can see what you are doing?

If you are using SPCascadeDropdowns, then that's a different thing. How that works is that the page loads just as it normally would without the script, and all dropdowns have all available values. Then the script runs and pares down the options based on the settings you've provided in the function call(s).