(noob here, so your patience is appreciated)
Unsure whether this is a question on JS API or the arcGIS Server itself.
Setup
Issue
Background/Troubleshooting_thus_far:
{
"f": "pbf",
"geometry": "{\"xmin\":-8981656.571621992,\"ymin\":4167958.2783359867,\"xmax\":-8962088.69238099,\"ymax\":4187526.1575769875}",
"orderByFields": "ESRI_OID",
"outFields": "ESRI_OID",
"outSR": 102100,
"quantizationParameters": "{\"extent\":{\"spatialReference\":{\"latestWkid\":3857,\"wkid\":102100},\"xmin\":-8981656.571621992,\"ymin\":4167958.2783359867,\"xmax\":-8962088.69238099,\"ymax\":4187526.1575769875},\"mode\":\"view\",\"originPosition\":\"upperLeft\",\"tolerance\":38.21851414257816}",
"resultType": "tile",
"returnExceededLimitFeatures": false,
"spatialRel": "esriSpatialRelIntersects",
"where": "cty_key='37025'",
"geometryType": "esriGeometryEnvelope",
"inSR": 102100
}
ESRI_OID is being asked in outFields. PgS dB tables do not have ESRI_OID column. But, during layer creation (in arc Pro) process, unique identifier was mapped to a column with unique identifiers (say. col name = uid, type = text). When querying attributes tables in arcPro, one can see ESRI_OID initialized using integers. So, when JS client asks for information about each feature, arcGIS server should serve up the results. Instead, for some reason, it is going to PgS with SQL query:
SELECT ESRI_OID,geometry FROM <blah> WHERE <blah> ORDER BY ESRI_OID ASC;Spatial Filter: esriSpatialRelIntersects;Search Geometry Envelope: (<blah>)
Tables are created and maintained using other programs, so altering tables' properties is not an option.
So, either i:
I'm sure I'm missing something very basic here. Penny for your thoughts?
I don't know anything about React, but my first thought was that I've never heard of ESRI_OID being used as the internal ID, it's always been OBJECTID from what I've seen. Since the REST service is in ArcGIS Online you can go there to check on the exact field names. Also, if you are confident with the 'ESRII_OID' fieldname, you should probably put those in lists like [ESRI_OID]. If all else fails, remark out the order by and put ['*'] in the outFields.
Thanks @JeffreyWilkerson.
layer information shows
ESRI_OID ( type: esriFieldTypeOID, alias: ESRI_OID, editable: false, nullable: false, defaultValue: null, modelName: ESRI_OID )