I have a question about this as well. Is there a way to auto-increment a number in AGOL / WebApp builder? I am looking to test a workflow for adding proposed/future project boundaries for public works projects, where a project manager could go to a web map, draw a polygon around an potential project area and fill in some attributes. I would like a ProjectID area to be auto-populated with a prefix. If this happens to be a water project, the prefix would be something along "WTR-" followed by a auto-incrementing number "0001" or "1" (doesn't matter too much). The number would increment based on existing values in another field and would potentially follow a formula (I'm thinking Arcade Expression) of Max Value + 1? If the project is a transportation project, the prefix would change...
I am looking for modernize our existing workflows so that everything can be added and tracked via web apps. I think this is the only limitation that is preventing us from moving our process to the web.
Hi Eugene, did you ever get you question answered?
I have a similiar requirement. I have points within a polygon. I would like the points to inherit the ID of a ID field within the polygon with a number at the end to uniquely identify it. For instance image I'm creating points within a polygon with ID 123456. With the smart-editor I can capture this value into a seperate field in my point FC "Poly_ID". My challenge is to get a unique value for the points as they are created within the polygon. The first being "Point_Nr" = 123456-0001, second "Point_Nr" = 123456-0002 and so forth. If "Point_Nr" = 123456-0001 already exist the next one I create must be "Point_Nr" = 123456-0002 and so forth.
Any tips would be appreciated
I have not heard back on this at all. This functionality would open so many new opportunities for us with web and field data collection.
Eugene A. Durshpek | GIS Manager
CITY OF VANCOUVER, WASHINGTON
Information Technology Department
PO Box 1995 | Vancouver, WA 98668-1995
P: (360) 487-7679 | C: (360) 726-7627
I'm not sure whether these are supported with hosted feature service cases yet.
[let me admit first that I didn't try it myself, but i know the basic concept and wanted to pass along in case it helps and if you haven't tried it yet]
I think you should be able to achieve what you are asking for using Attribute Rules in an enterprise feature service.
Here is the help link for attribute rules: Introduction to attribute rules—Geodatabases | Documentation
Attribute Rules use Arcade expression which has a function called NextSequenceNumber() - that might help you with generating sequential numbers.
.... in addition, using other spatial and non-spatial arcade function, you can achieve things mentioned in earlier posts such as:
- prefix an auto increment number with some hard-coded string (example)
- prefix the number with the polygon a point belongs to.
[this is i know for sure ]
if your data stored in an enterprise database, of course then database supports numeric field with auto-increment values - which is similar to ObjectID. This is outside of ArcGIS though.