HOW TO

Remove curly braces from the GlobalIDs in a text/GUID field

Last Published: April 19, 2022

Summary

In some cases, the GlobalIDs are contained in braces or are all upper case. For instance, in Portal for ArcGIS, GlobalIDs are contained in curly brackets and are in upper case while in ArcGIS Online generally do not include braces and are all lower case, as seen in the image below.

GlobalIDs expressed in ArcGIS Online versus Portal for ArcGIS

However, GlobalIDs may be contained in curly brackets and in uppercase when they are passed to another field (text or GUID) in ArcGIS Online. This may happen for different reasons. For instance, if GlobalIDs are passed from a feature to a GUID field in a survey through the ArcGIS Collector app using a custom URL scheme, the GlobalIDs are contained in curly braces.

This may cause issues in some workflows when it is necessary to use GlobalIDs but they do not behave as expected due to having a different format. It may also be necessary to make GlobalIDs uniform to improve data integrity.

Procedure

To do this, an Arcade calculation can be used to remove the braces and convert upper case to lower case. The advantage of using these expressions is that if there is a mixture of both ID types, it only updates the ones in upper case and with curly braces.

Lower(Replace(Replace($feature["Parent_GlobalID"], '{', ''), '}', ''))

or

Lower(IIf(Count($feature["Parent_GlobalID"]) >37, mid($feature["Parent_GlobalID"], 1,36), $feature["Parent_GlobalID"]))
  1. From either the table view in Map Viewer or from the Data tab from the item description page. Choose Calculate from the field options, as shown in the image below.
Calculate field option shown in Map viewer
  1. In the Calculate Field dialog, select Arcade.
  2. In the Arcade Calculator dialog, enter the Arcade expression and click Test.
Testing the results in the Calculator dialog
  1. If the test value looks correct, click OK to calculate the new field values, as shown in the image below.
The new field with calculated values

Article ID: 000026830

Software:
  • ArcGIS Online

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options