Select to view content in your preferred language

Use gdbVersion to Return the Current Version Being Edited in Attribute Rules

1376
2
01-13-2021 01:11 PM
HusseinNasser2
Esri Contributor

Learn how to use the gdbVersion Arcade function in ArcGIS Pro 2.7 to create an attribute rule that can perform logic based on the connected version.

If you are interested in following along, you can find sample scripts at the following location: https://bit.ly/2Vv7tKt

 

2 Replies
Andy_Morgan
Frequent Contributor

The GdbVersion doesn't seem to work with a text field. I'm using ArcGIS Pro 3.3.3

The "G" is uppercase compared to the video tutorial: GdbVersion($feature)

In any case, I've tried all case combinations. With only 2 lines of code, I cannot get it working.

var CurVersion = GdbVersion($feature)
return CurVersion

 

Result of above on field calculate (for a simple text field of 16 characters) for a versioned layer in a Utility Network:

ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
Message: Unable to complete operation.
Details: Unable to perform applyEdits operation.
Error: Invalid column value [UT_GISID].
Failed to execute (CalculateField).

 

Is there a bug with 3.3.3 or is the documentation wrong?

https://developers.arcgis.com/arcade/function-reference/feature_functions/#gdbversion

 

0 Kudos
Andy_Morgan
Frequent Contributor

Nevermind, I realized the output was too large for my target field.

This solved it:  Left(GdbVersion($feature), 16)  

How do I delete a post in Esri Community? Under Post Options for my reply I only see Edit Reply but not a Delete option.

0 Kudos