Skip to content

Instantly share code, notes, and snippets.

@hmane
Last active August 29, 2015 14:20
<Query>
<Where>
<Eq>
<FieldRef Name="FieldName" LookupId="TRUE" />
<Value Type="Integer">1</Value>
</Eq>
</Where>
</Query>
SPQuery query = new SPQuery
{
Query = string.Format(@"<Where>
<Eq>
<FieldRef Name='{0}' LookupId='TRUE' />
<Value Type='Integer'>{1}</Value>
</Eq>
</Where>", "FieldName", "1"),
RowLimit = 10,
ViewFields = string.Concat("<FieldRef Name='FieldName' />",
"<FieldRef Name='FieldName' />")
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment