laptop and a wrench

Bug

Custom data feeds provider fails to return count when returnCountOnly is set to True.

Portal for ArcGIS
Bug ID Number BUG-000178907
SubmittedAugust 21, 2025
Last ModifiedSeptember 11, 2025
Applies toPortal for ArcGIS
Version found11.5
Operating SystemWindows Server
Operating System Version2025
StatusNon-Reproducible

Additional Information

BUG-000178907 - returnCountOnly Thanks for taking the time to submit an issue and for the interest in custom data feeds. This issue that is being brought up here does not expose a bug in custom data feeds (CDF). One of the initial queries sent by ArcGIS clients to feature services usually contains the returnCountOnly parameter. This is required so that proper pagination occurs. CDF providers generally follow one of two data loading patterns: full-fetch or pass-through. In a full-fetch pattern provider, all the data is returned at once (no pagination), so there is no need to independently handle returnCountOnly. The CDF framework counts the number of features returned in the GeoJSON from the getData() method and generates the count for the response. In a pass-through pattern provider, the developer needs to handle this. The client needs to make multiple requests until all the data are loaded. The developer must intercept the request that contains the returnCountOnly parameter and return an appropriate value so that proper pagination can occur. In the sample provider given, the count is being returned along with GeoJSON metadata, which is incorrect, and the CDF framework is interpreting it as improperly formatted GeoJSON. The proper way is to return count JSON immediately, not with metadata at the end of the getData() method. The way to do this is shown in the CDF documentation here: https://developers.arcgis.com/enterprise-sdk/guide/custom-data-feeds/pass-through-custom-data-providers/ Also, see the ArcGIS REST specification on returnCountOnly and returnExtentOnly here: https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/ Adding 'return output;' on line 37 in the 'if statement' in the provided code would fix the problem. Hope this helps.

Steps to Reproduce

Bug ID: BUG-000178907

Software:

  • Portal for ArcGIS

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options