We are deploying Collector in our institution and for offline work on unversioned data we need to enable archiving.

The feature class needs some updates when the user enters new records using the collector or webmap.

So to make this update we put a trigger on the archiving-enabled feature class to update the view of that feature class, as the documentation says.

The problem is that when this trigger is fired, it appears that the record was not fully created in the feature class, and the result is that the update made by the trigger is not applied to the register with the gdb_to_date attribute value 12/31/9999 but in the previous record.

In an answer at GeoNet to SQL Trigger on table causes CODE 500 Error, someone said that when an insert is made into an archived feature class, an insert is made and then an update, and the trigger is firing on the insert.

Our database is PostgreSQL.

Below the records that represent the problem described, note that the attribute "situacao" is updated with the value "ATIVO" by the trigger and then the final record is created (gdb_to_date 12/31/9999) without the value "situacao" = "ATIVO"

In my view the update trigger should be fired after this last record gdb_to_date 12/31/9999, but that's not what happens.

Nor do we understand why the update is deleted from the final registry.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.