I am working on to get data from SharePoint list using the RenderListDataAsStream endpoint. What I am doing is first getting all the views defined for the list and showing them in a dropdown on UI and then when user selects the view

  • I get the ListViewXML for that view
  • Create a custom filter query something like <Query><Where>...</Where></Query>

and then pass that ListViewXML as ViewXML and Custom filter as OverrideViewXml in body parameters for rest call of RenderListDataAsStream.

From here, it says OverrideViewXml is for

Specifies the override XML to be combined with the View CAML. Applies only to the Query/Where part of the View CAML.

I want to know how exactly OverrideViewXml works in conjuction with ViewXml. When I specify ViewXML, OverrideViewXml query is ignored or doesn't work. When I specify only OverrideViewXml and not ViewXml, OverrideViewXml query works. Right now for me, results are not coming with any combination(whether "ANDing" or "ORing") of OverrideViewXml with the ViewXML.

For rest calls I am using PNP JS library(2.0.3) and solution is in SPFX

Your Answer

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

Browse other questions tagged or ask your own question.