2

Folks I'm looking to use the "standard rendering element" <PageUrl/> within a CAML query as per below:

 <Or>
    <Eq>
       <FieldRef Name="Webpage" />
       <Value Type="Text">
          <PageUrl />
       </Value>
    </Eq>
    <Eq>
       <PageUrl />
       <Value Type="Text">
          // e.g. http://myDiscussionBoardRootUrl
       </Value>
    </Eq>
 </Or>

<PageUrl/> equals the current webpage that the query is being run in e.g. http://pagequeryrunin.com. The first part of the <Eq> query works fine - it compares a field within my list (incidentally it's a discussion board) to the current url in which the query is called in, but the second <Eq> fails with a correlation id error.

Is it possible to check if the <PageUrl/> equals a predefined string/url?

Thanks folks.

Standard rendering elements: https://msdn.microsoft.com/en-us/library/office/ms439798.aspx

0

Try like this:

<Or>
    <Eq>
       <FieldRef Name="Webpage" />
       <Value Type="Text">
          <PageUrl />
       </Value>
    </Eq>
    <Eq>
       <Value Type="Text">
          <PageUrl />
       </Value>
       <Value Type="Text">
          // e.g. http://myDiscussionBoardRootUrl
       </Value>
    </Eq>
 </Or>
  • Thanks Sergey but no dice! (I'm still left with a correlation error) – Kunal Nov 25 '15 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.