HOW TO
ArcGIS Arcade is disabled in the Calculate Field dialog box when synchronization is enabled on a hosted feature layer. In some cases, the hosted feature layer attribute table has data containing leading and trailing spaces in the field values. The spaces in the field values can be removed using SQL expressions.
This article provides instructions to remove the leading and trailing spaces from strings using SQL expresions in ArcGIS Online and Portal for ArcGIS.
The image below shows the hosted feature layer attribute table with leading and trailing spaces in the field values in ArcGIS Online.
TRIM(BOTH ' ' FROM <fieldName>)
TRIM(BOTH ' ' FROM District)
Note: If the field values has only leading spaces, change the BOTH syntax to LEADING. If the field values has only trailing spaces, change the BOTH syntax to TRAILING. Refer to ArcGIS Online: Which SQL functions are supported in ArcGIS Online? for more information.
The image below shows the leading and trailing spaces are removed from the field values.
Get help from ArcGIS experts
Download the Esri Support App