maxRecordCount

738
9
Jump to solution
02-07-2023 11:58 AM
Paco
by
New Contributor III

Another question about maxRecordCount.

My AGOL Hosted point Feature Layer only allows up to 1000 selected features in my Webapp.

Like many others before me, I have tried updating the Service Definition maxRecordCount to a higher number(10,000) and save, but the selection still stays at 1000. and it also reverts back to 1000 in the Service Defintion. there are a few places to update that maxRecordCount in the definition, and only one of those reverts back to the lower number.

ESRI can we please get an explanation on Selecting AGOL Hosted Features? please advise how to raise that maximum selection.

thx!

0Kudos
1 Solution

Accepted Solutions
HollyTorpey_LSA
Occasional Contributor III

Are you certain that you selected the desired layer within the feature service and updated its maxrecordcount value? I believe you need to do this even if your feature service has only one layer. And then I think you may also want to update the maxrecordcount for the parent service so that it's at least as much as the maxrecordcount of the layer it contains.

- Holly

View solution in original post

9 Replies
KenBuja
by MVP Esteemed Contributor
MVP Esteemed Contributor

当n you updated it, did you also set the lastEditDate value to null in step 7 of theinstructions?

0Kudos
Paco
by
New Contributor III

Yep. would i need to update All of the "_lastEditDate"s?

"lastEditDate" : null,
"schemaLastEditDate" : 1675798413474,
"dataLastEditDate" : 1675798413474

still, everytime I go back to check the Definition, the null is gone and the max count is back to 1000

0Kudos
KenBuja
by MVP Esteemed Contributor
MVP Esteemed Contributor

当n I needed to change it, I only modified the lastEditDate.

0Kudos
HollyTorpey_LSA
Occasional Contributor III

Are you certain that you selected the desired layer within the feature service and updated its maxrecordcount value? I believe you need to do this even if your feature service has only one layer. And then I think you may also want to update the maxrecordcount for the parent service so that it's at least as much as the maxrecordcount of the layer it contains.

- Holly
Paco
by
New Contributor III

Yes. I am opening the specific Hosted Feature Layer in AGOL(using 'View' URL on the Overview page. which gets me to the ArcGIS REST Services Directory, and clicking on "Admin" in the upper right, and clicking on "Update Definition" at the bottom.

searching for and updating "maxRecordCount" and "lastEditDate"(10,000 and null) and clicking on "Update Service Defintion".

going back to my Experience Builder application, the selection box still only allows 1000 features. and if I go back to the Service Defintion, those updates have reverted back to 1000 and random numbers again.

has anyone gotten this to work with their AGOL Hosted Feature Layers? does it only work in Portal? any ideas?

thanks again!

0Kudos
Clubdebambos
Occasional Contributor III

Hi@Paco

I use the Python API to set the maxRecordCount for individual layers in a Feature Service as shown below.

来自arcgis arcgis导入GIS。功能导入FeatureLayer agol = GIS("home") update_dict = { "maxRecordCount": "10000" } item = agol.content.get("FS_ITEM_ID") for lyr in item.layers: print(lyr.properties.name) fl = FeatureLayer(lyr.url, agol) print(fl.manager.update_definition(update_dict))

You can then check that this sticks by printing out the maxRecordCount property for each layer.

来自arcgis arcgis导入GIS。功能导入FeatureLayer agol = GIS("home") item = agol.content.get("FS_ITEM_ID") for lyr in item.layers: print(lyr.properties.name) fl = FeatureLayer(lyr.url, agol) print(lyr.properties.maxRecordCount)

~我的方式映射到退休
HollyTorpey_LSA
Occasional Contributor III

@Pacowrote:

Yes. I am opening the specific Hosted Feature Layer in AGOL(using 'View' URL on the Overview page. which gets me to the ArcGIS REST Services Directory, and clicking on "Admin" in the upper right, and clicking on "Update Definition" at the bottom.

searching for and updating "maxRecordCount" and "lastEditDate"(10,000 and null) and clicking on "Update Service Defintion".

But after you click 'View', are you clicking on the layer name before clicking 'Admin'?

HollyTorpey_LSA_0-1676066738227.png

- Holly
0Kudos
Paco
by
New Contributor III

Holly! I actually was going to post a conclusion to my question earlier today! and THIS was the issue. thanks for posting. I was not going far enough into the Service and choosing the specific Layer. I didn't think I needed to because I only had One Layer per Service, but I did.

so, click Service URL, CHOOSE LAYER, Admin, and alter the field numbers. even if there is only One Layer in the Service.

Thank you everyone for your input. moving forward now!

p

HollyTorpey_LSA
Occasional Contributor III

Cool! Glad I could help! (Or that you figured it out on your own!):slightly_smiling_face:

- Holly
0Kudos