Select to view content in your preferred language

Calculated expression runs when updating existing field

535
2
Jump to solution
09-14-2023 02:23 AM
MappyIan
Occasional Contributor III

I have a calculated expression that add the current date/time to a field when a record is captured in Field Maps.  However, if I update any existing record via Field Maps the calculated expression runs again, which means the original date/time the record was captured is lost.

I expected that the calculated expression would only run when creating new records, not when updating existing records.

Does anyone know if there is a workaround to this?

1 Solution

Accepted Solutions
MappyIan
Occasional Contributor III

Thanks @RodellZorilla, I found another similar post after asking the question:

https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-se...

The solution in the above post uses the IsEmpty function in conjunction with $editcontext.editType to check if the record is being updated or inserted.

View solution in original post

2 Replies
RodellZorilla
Occasional Contributor

Hello, this post may be helpftul. See the IsEmpty function here also. Thanks!

MappyIan
Occasional Contributor III

Thanks @RodellZorilla, I found another similar post after asking the question:

https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-se...

The solution in the above post uses the IsEmpty function in conjunction with $editcontext.editType to check if the record is being updated or inserted.