Do pagination query work only when orderBy is OBJECTID.
I am using a statistics query like below, where I want to run a count statistics on a total of 50k+ records.
I am trying to retrieve 2000 records per query using pagination. But the results are always returned for the first 2000 records.
Is there a way to do a pagination query for the statistics I am trying to achieve here?
Hi there
It is accepted and should work. Do you have a reproducible case so I can take a look? For example the following query returns this result from the service.
const summaryQuery = layer.createQuery();
summaryQuery.set({
where: "(COMMON is not null)",
outFields: ["*"],
groupByFieldsForStatistics: ['COMMON', 'BOTANICAL'],
orderByFields: ['SpeciesCount desc'],
outStatistics: [{
statisticType: "count",
onStatisticField: "COMMON",
outStatisticFieldName: "SpeciesCount"
}],
num: 5
});