Summary
In Map Viewer, auto-sequential values can be added to facilitate efficient data interpretation and improved spatial distribution identification.
This article provides the workflow for newly created features to include sequential values in a field using an Arcade expression.
Procedure
- Open the web map in Map Viewer.
- In the Layers pane, select the layer. In this example, the polygon layer named Test is used.
- On the Settings (light) toolbar, click Forms.
- In the Configure form window, under the Form builder pane, under Fields, double-click the desired field to configure it.
- Click the selected field to open the Properties pane.
- In the Properties pane, under Logic, for Calculation expression, click Expressions .
- In theĀ Calculated expressions window, click + New expression.
- In the Arcade editor window, configure the expression below.
var <variable1> = Max($layer, '<field_name1>')
var <variable2> = Number(<variable1>)
return <variable2> + 1
- Replace <variable1> and <variable2>with the desired variable names. In this example, TempID and MaxID are used.
- Replace <field_name1> with the name of the field containing the field values. In this example, SUPPORTID is used.
- Click Done.
- Click OK to save the form.
The image below displays the SUPPORTID field populated with sequential values when a new feature is created on the web map.