Property given on ViewXml of RenderListDataOptions under LoadListDataAsStreamAsync is not working as expected
See original GitHub issueCategory
- Bug
Describe the bug
ViewXml provided with fields Like “ID” is not returned from LoadListDataAsStreamAsync operation. “ID” is just an example I have shared here with the example code below. However in my scenario provided list has around 80 fields, when applied all these fields under ViewXml during query with LoadListDataAsStreamAsync, only 60 fields and their values are returned.
Steps to reproduce
int rowLimit = 200;
bool paging = true;
string nextPage = null;
string viewXml = "<View><ViewFields><FieldRef Name='ID'/></ViewFields><RowLimit Paged='TRUE'>200</RowLimit></View>";
var loadOption = new RenderListDataOptions()
{
ViewXml = viewXml,
RenderOptions = RenderListDataOptionsFlags.ListData,
Paging = nextPage ?? null,
DatesInUtc = true,
FolderServerRelativeUrl = folderRelativeUrl
};
while (paging)
{
var output = parentList.LoadListDataAsStreamAsync(loadOption).Result;
if (output.ContainsKey("NextHref"))
{
nextPage = output["NextHref"].ToString().Substring(1);
}
else
{
paging = false;
}
}
var result = parentList.Items.AsRequested();
//here result[0].values misses the "ID" value.
Expected behavior
Method should have returned field values with all the provided fields.
Environment details (development & target environment)
- SDK version: [1.3.0 ]
- OS: [Windows 10]
- SDK used in: [Console App]
- Framework: [ .NET Framework v4.7.2 ]
- Tooling: [Visual Studio 2019]
Additional context
Thanks for your contribution! Sharing is caring.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Can't update list item · Issue #399 · pnp/pnpcore
I'm able to update the list item, when I'm getting it in the following way: await list. LoadListDataAsStreamAsync(new RenderListDataOptions() { ...
Read more >Working with list items | PnP Core SDK
Using the LoadListDataAsStreamAsync method gives you the most control over how to query the list and what data to return. Using this method...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gopaldahal : I’m closing this issue as what’s returned by a caml query is beyond my scope to change here, in my testing I see all properties being returned, so weird you always miss the Edit field.
Would also strongly recommend to give the current nightly a go as there have been massive perf improvements that will help with speeding up the reading of list data. Check the changelog and commit history to learn more.
@jansenbe: If you are sure that SharePoint on itself does not return computed fields (when explicitly asked), I have no problem closing this one.
Retired again regarding “Edit” property, but still not retrieved on my end( no view fields specified). https://comparetext.codersup.com/shareUrl/b84fe267-a344-432f-a568-4ed0e4eeb44e