setDefinitionExpression is including the resultOffset and resultRecordCount parameters that are causing the service query to return No records found. If I make the same query without these parameters it returns records.
How can I eliminate these parameters from being added to the query when I set the definition expression?
or
How can I get the service to return records with these parameters set?
resultOffset=0
resultRecordCount=1000
No records found query
If I remove theses parameters &resultOffset=0&resultRecordCount=1000 then it returns the expected 72 records.
Also of note if I change the where statement to 1=1 it will return all the records even with the resultOffset and resultRecordCount parameters.
I think that question should be on the ArcGIS Server topic.
Folow that link to see if it helps: Error: Pagination is not supported
Thanks,
The service indicates that it supports advanced queries including Pagination.
So, how can I eliminate the resultOffset and resultRecordCount parameters and values from being included in the query that is generated by the setDefinitionExpression?
I think that could be a bug on ArcGIS Server. It should return the records with the 2 parameters. I don't know how to remove it in the API
Remove line 774 of Search.js and it should go away.
Changing the feature layer from MODE_SNAPSHOT to the default MODE_ONDEMAND seems to have solved the issue.
This is only available in the 3.x version of the API. The newer 4.x version doesn't have this property.
I have experienced the same issue in ArcServer 10.51.
The only workaround that worked for me when using the 4.x api was to enable feature access in the manager under Capabilities
And then to reference the rest endpoint at "FeatureServer" instead of "MapServer"
For Example:
I have the similar issue.
I found the problem is at the REST API level when querying a ArcGIS Server Map/Feature Service with a spatial filter.
If the resultOffset and resultRecordCount are not set, it returns all the matching records, if they are set the query returns wrong number of records. for example, if the resultRecordCount is set to 500, it only returns 36 records with exceededTransferLimit=True.
This issue should affect all the other APIs that wraps the REST API, such as Javascript API, Python API, ArcGIS Runtime SDKs...