Summary
In ArcGIS Online and Portal for ArcGIS Map Viewer, it is sometimes necessary to display truncated field values in pop-ups for better readability.
This article provides the workflow to truncate the field values and display them in pop-ups using an Arcade expression. In this example, the field named Company contains the field values to be truncated, as shown in the attribute table below.

Procedure
- Open the web map in Map Viewer.
- In the Layers pane, select the layer. In this example, a polygon layer named ‘Plantation’ is used.
- On the Settings (light) toolbar, click Pop-ups. Ensure pop-ups are enabled by toggling Enable pop-ups on.
- In the Pop-ups pane, create an Arcade expression to display the field names in the pop-ups. Refer to ArcGIS Online: Use expressions or Portal for ArcGIS: Use expressions for instructions.
- In the editor window, configure the expression below.
Text(Left($feature.<field_name>, <value>))
- Replace <field_name> with the name of the field containing the field values. In this example, 'Company' is used.
- Replace <value> with the number of characters for the field values to be truncated. In this example, ‘3’ is the value used in the expression.
Note:
The Arcade expression only displays the initial characters of the field value, and this behavior depends on the specific value used in the expression.
- Click Done.
Note:
Click OK in Portal for ArcGIS Map Viewer.
- In the Pop-ups pane, click Fields list and click Select fields.
- In the Select fields pane, under Expressions, click the expression created in Step 5 to display in the pop-up.
The Map Viewer pop-up below displays the truncated field values specified to three characters.