Select to view content in your preferred language

ArcGIS Enterprise - Postgres Trigger Workflow

540
3
Jump to solution
04-20-2023 07:28 AM
KIVANC
by
New Contributor II

I am working on a project where users enter data to a table using survey123 in ArcGIS Enterprise and I would like to have a trigger in postgres to auto-populate a second table whenever a row is inserted, which should be available in ArcGIS Enterprise as well. I believe since the table has objectID and GlobalID fields, my trigger function failed when I added data in ArcGIS Pro as a trial.

Appreciate any help regarding this. Maybe there is another logical approach that I am missing?

Thanks

0 Kudos
1 Solution

Accepted Solutions
MarlonAmaya
Esri Contributor
0 Kudos
3 Replies
MarlonAmaya
Esri Contributor

Hi @KIVANC 

Look into using Attribute Rules if are you using ArcGIS Pro exclusively.

Attribute Rules (calculation rule)

https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/an-overview-of-attribute-ru...

Share data with attribute rules

https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/share-datasets-with-attribu...

 

Marlon

0 Kudos
KIVANC
by
New Contributor II

Hi Marlon

Many thanks for your reply. I didn't know I could achieve this with attribute rules.

Do you by any chance know of any documentation regarding how I could define feature classes outside the one I am creating the rule for? As this is going to Enterprise  and the datasets are in postgres, I don't know how to reference the layers.

For instance would this work say getting the data from test_layer?

var test_variable = FeatureSetByName($datastore, "test_layer")

Thanks

Kivanc

 

0 Kudos
MarlonAmaya
Esri Contributor

Hi @KIVANC ,

Yes, if you want to reference another feature class, the FeatureSetByName would be used.

The following resources are helpful to review examples and review how different functions are utilized.

 

https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-script-expre...


https://developers.arcgis.com/arcade/profiles/attribute-rule-calculation/

 

Marlon

0 Kudos