Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 6th, 2012  |  syntax: None  |  size: 1.05 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. SharePoint - Doing a user lookup on GetListItems SOAP call
  2. <Query>
  3. <Where>
  4.     <And>
  5.         <Leq>
  6.             <FieldRef Name="Created" />
  7.             <Value Type="DateTime" IncludeTimeValue="FALSE">2011-1-8</Value>
  8.         </Leq>
  9.         <Geq>
  10.             <FieldRef Name="Created" />
  11.             <Value Type="DateTime" IncludeTimeValue="FALSE">2011-1-2</Value>
  12.         </Geq>
  13.         <Contains>
  14.             <FieldRef Name="CreatedBy" LookupId="TRUE" />
  15.             <Value Type="User">Smith</Value>
  16.         </Contains>
  17.     </And>
  18. </Where>
  19.        
  20. <Contains>
  21.    <FieldRef Name="CreatedBy" />
  22.    <Value Type="Text">Smith</Value>
  23. </Contains>
  24.        
  25. <Where>
  26.   <And>
  27.     <And>
  28.       <Leq>
  29.         <FieldRef Name="Created" />
  30.         <Value Type="DateTime" IncludeTimeValue="FALSE">2011-1-8</Value>
  31.       </Leq>
  32.       <Geq>
  33.         <FieldRef Name="Created" />
  34.         <Value Type="DateTime" IncludeTimeValue="FALSE">2011-1-2</Value>
  35.       </Geq>
  36.     </And>
  37.     <Contains>
  38.       <FieldRef Name="CreatedBy" />
  39.       <Value Type="Text">Smith</Value>
  40.     </Contains>
  41.   </And>
  42. </Where>