FindItemsAsync seems to only return 10 items

08-22-2017 11:24 AM
MVP Regular Contributor

I am doing a very simple query to get all the items of specific PortalItemType (Feature Services) from a group

PortalQueryParameters groupParameters = PortalQueryParameters.CreateForItemsOfTypeInGroup(itemType, portalGroup.GroupId);

PortalQueryResultSet<PortalItem> queryResultSet = await portalGroup.Portal.FindItemsAsync(groupParameters);

The problem is it is only returning 10 items in the group when there are far more.  I don't see anything in the documentation that would indicate a maximum number of returned items, and if there is how you get the next set.  If I add a query string (in this case tag)

PortalQueryParameters groupParameters = PortalQueryParameters.CreateForItemsOfTypeInGroup(itemType, portalGroup.GroupId, "Download");

PortalQueryResultSet<PortalItem> queryResultSet = await portalGroup.Portal.FindItemsAsync(groupParameters);‍‍‍

Items that are not included in the first query are returned, so I know they are there in the group (well I can see them in Portal, so I know they are there).

What is going on?  Obviously only returning a subset of the items in the group is not acceptable when I need to get them all.



0 Kudos
2 Replies
MVP Regular Contributor

There is limit property on QueryParameters I did not notice.

 PortalQueryParameters.Limit Property 

0 Kudos
Esri Frequent Contributor

Yup. The default is 10, and you can set it all the way up to 100