ArcGIS Arcade can be used to calculate fields in records captured with ArcGIS QuickCapture. A project author can write an expression that uses Arcade functions, operators, and record values.
The Arcade QuickCapture profile includes the following variables that can be used to return record values:
- $feature—Attributes of the current record
- $layer—Features in the same layer as the current record
- $datastore—Layers in the same feature service or database as the current record
- $map—Collection of feature service layers in the web map that is used by the QuickCapture project
For more information, see QuickCapture profile variables.
By default, the project web map does not include the project layers, so to use expressions that reference layers by name, for example, var layername = FeatureSetByName($map, "layer_name"), you must either choose the option to create a web map when configuring the QuickCapture project or replace the default web map with one that contains all the layers needed for the expression. For more information, see Project map configuration.
Note:
If you plan to use Arcade expressions in your project, check the project layers and web map for the DateOnly, TimeOnly, TimestampOffset, or BigInteger field types. You must create a hosted feature layer view that excludes these fields and use the layer view in the project instead. These field types are not supported by the Arcade version (1.18) used by the QuickCapture mobile app.
To learn more, see Create hosted feature layer views in ArcGIS Online or Create hosted feature layer views in ArcGIS Enterprise.
The following are example use cases that can be constructed as an Arcade expression:
- Calculate a value from values from another field.
- Do a point in polygon query to return an attribute value.
- Use a function to calculate the time duration of a captured polyline.
The QuickCapture designer includes an expression builder to help authors write expressions and uses the QuickCapture profile. Similar to how user inputs are defined once and usable in more than one button, once an Arcade expression is saved in the designer, it can be assigned to more than one button.
Fields that are managed by ArcGIS—such as OBJECTID, GlobalID, CreationDate, Creator, EditDate, and Editor—should not be used in an expression because their values are not known until after a record is submitted. If an expression requires a value for a username or record capture date, the expression should reference a field that has been populated with a device variable.
Note:
Records captured when the device is offline that contain Arcade expressions will only be processed when the device is next online, and only then will they be sent.
Use Arcade
To configure an Arcade expression for a field, complete the following steps:
- Verify that you are signed in to an organization.
- Open a project, and select a button to configure.
- On the Data tab, from the drop-down menu of the capture field, choose Arcade expression, and select Create new.

- Write an expression with the aid of the Profile variables and Functions menu items.
- Provide a label for the expression, and choose Create.
The label of the expression that you just created is displayed in the capture field on the Data tab of the web designer. This expression is also available for re-use in the capture field of other buttons in this project.
Use ArcGIS Arcade assistant (beta)
The ArcGIS Arcade assistant (beta) uses artificial intelligence (AI) to generate Arcade expressions from instructions you type in natural language. For best results, use clear and plain language and iterate on the responses you receive.
To use the ArcGIS Arcade assistant (beta) in QuickCapture, complete the following steps:
- Verify that you are signed in to an organization.
You must sign in as a member of an organization with a role that includes privileges to use AI assistants.
- Open a project, and select a button to configure.
- On the Data tab, from the drop-down menu of the capture field, choose Arcade expression, and select Create new.
- Click the Arcade assistant button
.The Arcade assistant pane appears.
- Use the assistant by doing either of the following:
- Click a suggestion and modify it to build a prompt that fits your data.
- In your preferred language, enter a prompt to build an Arcade expression.
- Click Generate to perform your query.
The ArcGIS Arcade assistant (beta) suggests an expression in the Arcade assistant pane.
Tip:
Hover over the Profile context button
to see where the suggested expression will be applied in the layer configuration. - To interact with the suggestion, do any of the following:
- Click Add to editor to add the expression to the expression builder pane.
Tip:
Position your pointer in the expression builder pane where you want the content to be added. For example, in the expression builder pane, move your pointer and click in front of an existing line of code. When you click Add to editor in the Arcade assistant pane, the suggested expression will be added to the expression builder pane at the position of the pointer.
- Click Replace all code in editor
to replace any existing content in the expression builder pane with the suggested expression. - Click Copy code to clipboard
to copy the suggested expression to the clipboard. - To make adjustments to the prompt, edit the previous prompt in the text area or copy and paste a previous prompt, and click Refine to submit the modified query.
- To provide feedback about the assistant, click the Helpful
or Unhelpful
button and complete the survey. The feedback is used to guide further development.
- Click Add to editor to add the expression to the expression builder pane.
- To clear the query history and start over, click Start over at any time.
Note:
To learn more about using the ArcGIS Arcade assistant (beta), see Understand best practices and Understand context limitations.