Select to view content in your preferred language

How to increate an ID when a record is created in a feature layer ArcGIS

86
1
Jump to solution
2 weeks ago
JoseSanchez
Frequent Contributor

Good morning,

We have a feature class with a field called ProjectID, which is a sequential number that increases by 1 each time a new project polygon is created in ArcMap using the Attribute Assistant toolbar.

We are migrating this feature class to ArcGIS Online (AGOL) as a hosted feature layer and are looking for a way to increment the ProjectID using Power Automate, triggered by the "When a record is created in a feature layer (ArcGIS)" action.

Are there any sample flows or examples that can help us create this automation?

Thanks

 

0 Kudos
1 Solution

Accepted Solutions
CodyPatterson
MVP Regular Contributor

Hey @JoseSanchez 

There is a way to do this with Power Automate, you can use the "When a record is created in a feature layer" trigger to do this, and then retrieve the max projectID by querying the feature layer with "Query Features" and then use a compose to calculate the largest value. Finally updating the feature with the new projectID using "Update a feature". You may also be able to do this with Arcade rules, but if you'd like that suggestion let me know!

Cody

View solution in original post

0 Kudos
1 Reply
CodyPatterson
MVP Regular Contributor

Hey @JoseSanchez 

There is a way to do this with Power Automate, you can use the "When a record is created in a feature layer" trigger to do this, and then retrieve the max projectID by querying the feature layer with "Query Features" and then use a compose to calculate the largest value. Finally updating the feature with the new projectID using "Update a feature". You may also be able to do this with Arcade rules, but if you'd like that suggestion let me know!

Cody

0 Kudos