Wednesday, 16 September 2015

SharePoint 2010 CAML Query For Search Within Folder

Search For Non Lookup Field Value

   <Query>
       <Where>
           <Eq>
               <FieldRef Name='Title'/>
               <Value Type='Text'>Val</Value>
           </Eq>
       </Where>
   <Query>
   <QueryOptions>
       <ViewAttributes Scope='Recursive' />
   </QueryOptions>



Search For Lookup Field Value 

   <Query>
       <Where>
           <Eq>
               <FieldRef Name='Title' LookupId='True'/>
               <Value Type='Lookup'>Val</Value>
           </Eq>
       </Where>
   <Query>
   <QueryOptions>
       <ViewAttributes Scope='Recursive' />
   </QueryOptions>

No comments:

Post a Comment