0

I am trying to write a simple query to filter highlighted content and can't figure out the CAML to accomplish it. The out of the box filter option is returning results in an odd order, and it needs to be sequential based on the GUID or a date column. So far I have:

<Query>
  <Where>
    <Eq>
      <FieldRef Name="ColumnName" />
      <Value Type="Text">ColumnValue</Value>
    </Eq>
  </Where>
  <OrderBy>
    <FieldRef Name="DateColumn" Ascending="FALSE"/>
  </OrderBy>
</Query>

But nothing changes in the web part.

Am I missing something?

1 Answer 1

0

I believe you have to wrap your entire query with a tag.

See the Microsoft Doc for more info with the screenshot under the Custom Query Section: https://support.office.com/en-us/article/Use-the-Highlighted-content-web-part-e34199b0-ff1a-47fb-8f4d-dbcaed329efd

1
  • That worked! I had to add the <View> element.
    – Bravo2xray
    Commented Apr 29, 2020 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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