Is there a way to auto-increment column in Web map/web app builder

2956
9
09-12-2018 07:26 AM
MRReddy
Occasional Contributor

is there a way to auto-increment a column from web map or web app builder

Andres Castillo

0 Kudos
9 Replies
AdrianWelsh
MVP Honored Contributor

Malla,

Can you be more specific on what you're looking to do? Auto increment like numbering?

0 Kudos
MRReddy
Occasional Contributor

Yes, For numbering

0 Kudos
AndresCastillo
MVP Regular Contributor

If you mean autoincrementing id's in wab, this might be something custom, but I don't know how to do this yet.

0 Kudos
AdrianWelsh
MVP Honored Contributor

Maybe I'm not understanding enough. Are you adding columns to your dataset and wanting to have them increase in number? Or are you asking something different?

0 Kudos
MRReddy
Occasional Contributor

Hi 

i Mean like primary key for column,    auto populate with increment number

Thanks

0 Kudos
EugeneDurshpek
New Contributor III

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.

Thanks!

Eugene D.

0 Kudos
NicoLuus
Esri Contributor

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
Nico

0 Kudos
EugeneDurshpek
New Contributor III

Hi Nico,

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.

Good luck.

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

0 Kudos
TanuHoque
Esri Regular Contributor

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.