HOW TO

Add auto-sequential values using Arcade in Map Viewer

Last Published: January 8, 2024

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

  1. Open the web map in Map Viewer.
  2. In the Layers pane, select the layer. In this example, the polygon layer named Test is used.
  3. On the Settings (light) toolbar, click Forms.
  4. In the Configure form window, under the Form builder pane, under Fields, double-click the desired field to configure it.
  5. Click the selected field to open the Properties pane.
  6. In the Properties pane, under Logic, for Calculation expression, click Expressions Expression button icon.png.
  7. In theĀ Calculated expressions window, click + New expression.
  8. In the Arcade editor window, configure the expression below.
var <variable1> = Max($layer, '<field_name1>')
var <variable2> = Number(<variable1>)
return <variable2> + 1
  1. Replace <variable1> and <variable2>with the desired variable names. In this example, TempID and MaxID are used.
  2. Replace <field_name1> with the name of the field containing the field values. In this example, SUPPORTID is used.
  1. Click Done.
Arcade expression configuration for the form.png
  1. 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.

Newly created features with auto sequential values.gif

Article ID:000031714

Software:
  • ArcGIS Enterprise 11 2
  • ArcGIS Enterprise 11 1
  • ArcGIS Enterprise 11 0
  • Portal for ArcGIS
  • 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

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options