Help creating a SQL database trigger for automating IDs for Collector.

77
0
11-21-2019 05:10 PM
NDFAdmin
New Contributor III

Hello,

I am attempting to create a database trigger that concatenates values from two different fields into an already existent empty field (or is set to null) for a newly inserted row. I'm not a DBA and I have no issue creating this type of statement in Python, but I am missing the mark in SQL. I am using an enterprise geodatabase as the backend for Collector and have used attribute rules or Python to accomplish this in the past (at a different job), but we really need this function to occur on submit and currently only have ArcGIS Server 10.5 and can't publish a feature service using ArcGIS Pro.

The basic structure would be something like:

IF [ProjectIDColumn] IS NULL

   THEN CONCATENATE (FieldOne + "-" + FieldTwo);

Any help would be greatly appreciated, thanks!

0 Kudos
0 Replies