Select to view content in your preferred language

How to detect when a QueryTask has returned the maximum number of results?

1519
5
Jump to solution
02-05-2013 06:36 PM
StephenLead
Honored Contributor
On ArcGIS Server's admin side it's possible to set the maximum number of results which will be returned by a query - by default the value is 1,000 records.

Can I detect that this limit has been reached when performing a query?

Eg, this query returns 1,000 records. Is it possible to detect that there are more records which were not returned, ie can I detect that I've hit a limitation?

Thanks,
Steve
0 Kudos
1 Solution

Accepted Solutions
derekswingley1
Deactivated User
On ArcGIS Server's admin side it's possible to set the maximum number of results which will be returned by a query - by default the value is 1,000 records.

Can I detect that this limit has been reached when performing a query?


Yes, if you're querying a 10.1 service as this was added at 10.1 (cmd or ctrl + f for "exceededTransferLimit" on the What's New in 10.1 ArcGIS Server page).

The JS API passes the value of exceededTransferLimit returned by the server as a property on the result set returned by a query task. Here's an example:  http://jsfiddle.net/MYQen/

View solution in original post

0 Kudos
5 Replies
derekswingley1
Deactivated User
On ArcGIS Server's admin side it's possible to set the maximum number of results which will be returned by a query - by default the value is 1,000 records.

Can I detect that this limit has been reached when performing a query?


Yes, if you're querying a 10.1 service as this was added at 10.1 (cmd or ctrl + f for "exceededTransferLimit" on the What's New in 10.1 ArcGIS Server page).

The JS API passes the value of exceededTransferLimit returned by the server as a property on the result set returned by a query task. Here's an example:  http://jsfiddle.net/MYQen/
0 Kudos
StephenLead
Honored Contributor
Thanks Derek.

Could you update the doco at http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#querytask to include exceededTransferLimit?

Cheers,
Steve
0 Kudos
derekswingley1
Deactivated User
Yep, we'll get it in there.
0 Kudos
derekswingley1
Deactivated User
Hey Steve,

We do have this in the docs, but it's documented on esri.tasks.FeatureSet as it's a property of the FeatureSet returned by a QueryTask.

The doc itself for exceededTransferLimit has some minor formatting issues but the content is there. We'll get the formatting issues fixed.
0 Kudos
StephenLead
Honored Contributor
Thanks Derek
0 Kudos