Auto-Incrementing Field for Feature Layer

151
3
Jump to solution
05-11-2021 01:41 PM
kjohnfs
New Contributor

TL/DR: Is there a way to auto-increment fields in Field Maps? I'm looking to configure a field with sequential integers for each new point feature (1, 2, 3, 4...)

I work in soils and use Field Maps to collect point features with form data (photo of form attached) in different numbered unit areas. We need to know how many points we have done in each unit, and counting or manually entering the point feature count/number is tedious out in the field. 

Is there a way to auto-increment and display the number point in that unit? For example, if this is the sixth point that a worker has taken in unit 45 is there a way for to autofill "6" in that form?  I saw some posts from 2016 that said Esri was "working on" this functionality.

 

Thank you!

0 Kudos
1 Solution

Accepted Solutions
CraigMueller1
New Contributor III

Hey, I've been able to do something similar to your idea using immediate calculation attribute rules and NextSequenceValue.  Having it increment and reset for specific areas is probably outside of the scope of what it can do unless you make a sequence per unit #. 

View solution in original post

3 Replies
CraigMueller1
New Contributor III

Hey, I've been able to do something similar to your idea using immediate calculation attribute rules and NextSequenceValue.  Having it increment and reset for specific areas is probably outside of the scope of what it can do unless you make a sequence per unit #. 

View solution in original post

JonathanMcDougall
Occasional Contributor II

@CraigMueller1  I'm a complete newbie to Arcade, I could do with some help on where the "NextSequenceValue('PipeIDSeq')" goes into a form and is this the only code that's needed? I do realise the PipeID will have to reference the correct field.

Many thanks and so sorry for such a basic question.

0 Kudos
CraigMueller1
New Contributor III

Hey Jonathan, sorry for not responding earlier. At the moment running Arcade expressions like NextSequenceValue can't be done in the form, but instead are run at the geodatabase level using calculation attribute rules. Here is an overview page I found on them. In Pro you can set up an attribute rule on a specific field to do a calculation when a specific event occurs. I use immediate calculation rules in a few places to have a field update or populate, and for NextSequenceValue specifically I use it to increment an integer field on insert of a new record. I mention "at the moment" because several blog posts about what's coming in Field Maps have insinuated (at least in my mind) that we may be able to have some attribute rule or similar automated calculations fire at the form level instead of the geodatabase level though I'd imagine in this case it would still only be possible to do at the geodatabase since the sequence itself is set up as a database object using the Create Database Sequence geoprocessing tool. I'm sure all of this explanation is a confusing mess, but I hope the overview steers you in the right direction.