Getting Unique ID using Attribute Rules

4368
6
Jump to solution
08-29-2018 03:32 PM
by Anonymous User
Not applicable

Hello,

I am trying to create a Unique ID using attribute rules.

The basic thing I am trying to figure out is to find the max number for field in the attribute table.

For example, looking at the column in the picture below.

When creating a new feature, I would like to set a attribute rules will automatically create the next number.

Which in this case would be 2704.

Using the "NextSequenceValue" seems like the best way to go about but I am not sure how to use this function.

Does "inputSequenceName" work more like how Attribute Assistant works?

Thank you and let me know if any clarification is needed.

1 Solution

Accepted Solutions
RobertKrisher
Esri Regular Contributor

I wrote a blog post that walks you through getting a sequence and attribute rule up and running ( Configurable Facility ID Creation Using the Utility Network | POWER Engineers  ).  So in your case you'd create a database sequence call something like "sequence_foo" and set the sequence start id to 2705, then you'd set up an attribute rule on your project table on create so that new features get their project number set using the next value in "sequence_foo".

Let me know if I missed the mark on your question or if you want any more details.  Good luck!

View solution in original post

6 Replies
RobertKrisher
Esri Regular Contributor

I wrote a blog post that walks you through getting a sequence and attribute rule up and running ( Configurable Facility ID Creation Using the Utility Network | POWER Engineers  ).  So in your case you'd create a database sequence call something like "sequence_foo" and set the sequence start id to 2705, then you'd set up an attribute rule on your project table on create so that new features get their project number set using the next value in "sequence_foo".

Let me know if I missed the mark on your question or if you want any more details.  Good luck!

by Anonymous User
Not applicable

Thank you!

This is exactly what I was trying to do.

0 Kudos
melvilegarias
New Contributor II

wow.. thank you ..

i'm looking for this all night...  very helpful ... great..

0 Kudos
tigerwoulds
Occasional Contributor III

The link no longer works. Is this available anywhere else now? 🙂

0 Kudos
KristalWalsh
Occasional Contributor II

Hi, I read through your article but realize that attribute rules don't seem to work unless there is a global id in the feature class or table which is the target of the auto-sequence event.  Is that correct? I have a database  with many relates and want to create auto-sequencing ids that are triggered by 1) a polygon drawn (a feature geometry) or a cell populated by customer information or property information being entered (related tables).  This is a file geodatabase which will be hosted in AGOL and customized for Field Maps. It is not an enterprise database. I've attached an entity relationship diagram and would appreciate any feedback on this. I'm certainly not opposed to changing data types or relates if I need to. This is a fresh build so now's the time to make it right! Thank you in advance. Kristal

Kristal Walsh, Florida Fish and Wildlife
Office of Conservation Planning
0 Kudos