This project is read-only.

Post your roboCAML.Query examples here...

Feb 8, 2012 at 8:35 PM

I'll be doing the same and in time, this thread will have many examples to reference.

Cheers,

Matt

May 11, 2012 at 1:26 PM
Edited May 11, 2012 at 5:48 PM

Here's a fun query that I use to test roboCAML: 

 

console.log(
	roboCAML.Query({
		listName: "Child",
		closeCaml: "ClientOM",
		ViewFields: ["MultiSelectLookup", "MyDollars"],
		OrderBy: {
			ID: true
		},
		config: [
			{
				filter: "&&",
				op: "=",
				staticName: "MultiSelectLookup",
				value: 4,
				lookupId: true
			},
			{
				filter: "&&",
				op: "=",
				staticName: "FSObjType",
				value: 0
			},
			{
				op: "IsNull",
				staticName: "MyDollars"
			}
		]
	})
);

 

 

The result is: 

 

<View>
	<ViewFields>
		<FieldRef Name='MyDollars' />
		<FieldRef Name='MultiSelectLookup' />
	</ViewFields>
	<Query>
		<Where>
			<And>
				<Eq>
					<FieldRef Name='MultiSelectLookup' LookupId='True' />
					<Value Type='Lookup'>4</Value>
				</Eq>
				<And>
					<Eq>
						<FieldRef Name='FSObjType' />
						<Value Type='Lookup'>0</Value>
					</Eq>
					<IsNull>
						<FieldRef Name='MyDollars' />
					</IsNull>
				</And>
			</And>
		</Where>
		<OrderBy>
			<FieldRef Name='ID' Ascending='True' />
		</OrderBy>
	</Query>
</View>