Map/Feature Service and Pagination question

2968
6
03-03-2020 08:35 AM
Arne_Gelfert
Occasional Contributor III

So I've run into an issue that appears to be related to pagination. Not something that I've ever thought about before. 

In short, I'm trying to replace an instance of QueryTask in JSAPI tied to a dojo search field with an instance of Search so that I can use the 'suggestions' feature.

But I can't get it to work. I kept getting a pagination error. It works when I switch my FeatureLayer out for this ESRI service: https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/US_Senators/FeatureServer/0


So I came across this thread about pagination: https://support.esri.com/en/technical-article/000012579 

...and I can replicate the behavior described there when I try to run a query at the Rest endpoint using result offset/result record count. 

So if pagination is turned on by default in SQL Server and works for FeatureLayer that are sublayers of a Map Service, why is it not working?

In ArcGIS Server Manager, I don't see anything I can tweak with regard to pagination. Any ideas what I should be trying here?

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus

Arne,

   Depends on your SQL Server version. SQL Server 2012 supports pagination, but 2008 does not.

0 Kudos
Arne_Gelfert
Occasional Contributor III

Just cut over to 2017. So I'm pretty sure it's not my SQL version. I think it's something specific to this map services. But I can't figure out what it is.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Arne,

   There are several thing covered in this article to check on your end.

Error: Pagination is not supported 

0 Kudos
Arne_Gelfert
Occasional Contributor III

Robert, that's the same article I linked to above. I didn't see anything in there that suggested a logical place for further investigation.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Arne,

   So you have checked the map service and verified that supports advanced queries is true?

0 Kudos
Arne_Gelfert
Occasional Contributor III

Yes, I did and the setting was 'false'. What I couldn't figure out was why. Sorry if that wasn't clear.

By now, I've identified the culprit as a layer in the ArcGIS Pro map behind the map service that was doing some funky join between feature classes in different databases. Never seen that before, and since I didn't author the original map it took a bit longer to track down.

supportsAdvancedQueries would return false in the following scenarios:

  • The layer / table resides in a workspace other than an enterprise database or File Geodatabase.
  • The layer / table is joined with another layer / table from a different workspace.

from: Layer / Table—ArcGIS REST API: Services Directory | ArcGIS for Developers 

Thanks for taking the time to look at this, Robert!