question

TL-1138 avatar image
0 Votes"
TL-1138 asked RaytheonXie-MSFT commented

Need a dynamic CAML Query for Sharepoint display form

Does anyone have a dynamic CAML query example where it returns all values from the list where the title fields equal the current item title field? I need a code example please. Thank You!
Using SharePoint 2013 lists


 <Query>
   <Where>
     <And>
       <Eq>
         <FieldRef Name="TItle" />
         <Value Type="text">+ 'Title` +</Value>
       </Eq>
       <Eq>
         <FieldRef Name="Title" />
         <Value Type="text">?????What would this be???? I was hoping [@Title]</Value>
       </Eq>
     </And>
   </Where>
 </Query>


sharepoint-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RaytheonXie-MSFT avatar image
0 Votes"
RaytheonXie-MSFT answered RaytheonXie-MSFT commented

Hi @TL-1138 ,
You can try following caml query to filter title fields equal the current item title field

     <View>
          <Query>
             <Where>
                  <Eq>
                      <FieldRef Name='Title'/>
                      <Value Type='Text'>your title</Value>
                  </Eq>
             </Where>
         </Query>
    </View>


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @TL-1138 ,
Have you tried the solution I proposed?

If you have any questions or progress, you can contact me in time.

Looking forward to your reply

Have a lucky day!

Thanks,
Raytheon Xie

0 Votes 0 ·

Hi @TL-1138 ,
Did the answer help you? If you have any question about the issue, please feel free to reply.

0 Votes 0 ·