laptop and a wrench

Bug

The Guid() Arcade function does not evaluate in the smart form in ArcGIS Field Maps.

Last Published: December 8, 2022 ArcGIS Field Maps
Bug ID Number BUG-000151657
SubmittedAugust 18, 2022
Last ModifiedSeptember 26, 2025
Applies toArcGIS Field Maps
Version found22.2
Operating SystemN/A
Operating System VersionN/A
StatusWill Not Be Addressed

Additional Information

The expression is not correct. Each time the expression evaluates, a new GUID is returned, leading to an infinite loop. Define a GUID initially and check if the field value contains a GUID. If it is empty, create and assign a GUID using the Guid() function. If not empty, return the current GUID field value. For example, to calculate a random GUID in a field, use the following expression and replace FIELDNAME with the name of the field: var id = $feature.FIELDNAME IIf(id==null, guid(), id)

Workaround

Define a GUID initially and check if the field value contains a GUID. If it is empty, create and assign a GUID using the Guid() function. If not empty, return the current GUID field value.

For example, to calculate a random GUID in a field, use the following expression and replace FIELDNAME with the name of the field:

var id = $feature.FIELDNAME

IIf(id==null, guid(), id)

Steps to Reproduce

Bug ID: BUG-000151657

Software:

  • ArcGIS Field Maps

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options