TransWikia.com

Using min-max functions in definition queries of feature services

Geographic Information Systems Asked by NeoJigglypuff on February 22, 2021

Using a feature service from ArcGIS Online, I would like to display a record wherein one of its attributes is the max of the entire records, but is unable to do so.

If I am using a Feature Class from a geodatabase, I would normally just specify something like this in the definition query:

enter image description here

The image above will only show records with the smallest and largest numerical value in its “admin id” field, and this works.

However when using a feature service, my challenge is identifying the table name to use. Below is the actual query being tested by me:

enter image description here

The intention of the above query is to make it show the last record edited. In lieu of the table name, ArcGIS shows a zero (0) instead. I have tried replacing the ? with 0, 1, and the layer name, but they seem to be incorrect.

enter image description here

The feature service being used was automatically created by ArcGIS Survey123, so there’s no MXD for me to apply the definition query on.

Any suggestions on what I can do to do this?

One Answer

Turns out that subqueries as part of the where clause is not possible in this scenario. ArcGIS Online only allows standard queries.

ArcGIS Online includes a security configuration option that forces developers to use standardized SQL queries when working with hosted feature layers. This makes it easier for developers and apps to query hosted feature layers and helps prevent SQL injection attacks. The option to allow only standard SQL queries is enabled by default.

Answered by NeoJigglypuff on February 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP