Select to view content in your preferred language

Make display field default to OBJECTID

660
5
11-17-2023 09:12 AM
Status: Open
Labels (1)
JamesPoeschel
Frequent Contributor

After creating a new feature class line or polygon, the default display field in the properties is Shape_Length. Every time I need to share a web layer to AGOL, I always get the error to change this manually.  After having to go through this so many times, I'm starting to wish the display field of newly created feature classes was simply defaulted to be AGOL friendly. 

5 Comments
RandyCasey

I don't get Shape_Length; for me it always defaults to some other random field that is always less than helpful, so yes, I too would like to see the default be OBJECTID.

RandyCasey

@KoryKramer thank you, Arcade Expressions are a phenomenal way to make the display show whatever data (transformed, combined, whatever...) you want. But the issue at hand here is what field gets displayed as the default. As in, I create a new feature class, load it into a map, click on a feature w/in that feature class, and what is the default field that shows up in the pop-up description. For whatever reason, in my experience, this field is some randomly chosen field. Sometimes it makes sense, like it will pick an address field, other times it makes no sense, like a dimension field or a shape field. This seems very arbitrary, and it would make more sense to just defaulted to the OID field until the user/database owner makes whatever appropriate field the display field.

AndreaB_

Agree, @JamesPoeschel thanks for posting! A new feature class with no other fields added will default to Shape_Length for us and then we have the same error/problem when we try to publish to AGOL. The link Kory put above says "By default, it is set to the first available string field in the feature layer containing the word name in the field name." It should also say, 'if there is no string field it will default to Shape_Length'.

Defaulting to ObjectID would be preferable.

JamesPoeschel

@KoryKramer For further clarification, when we publish a webmap through PRO that has a lot of polylines/polygons, we get this message:

JamesPoeschel_0-1730132250196.png

Yes, we can fix this manually in properties or in arcade, but often times there are so many to fix and it gets tedious.
My request is that the display fields are just set to ObjectID by default.