Configure the form

Mobile workers read, enter, and update forms to collect data and perform inspections. Ensure that mobile workers are successful in the field by configuring the form in the Field Maps web app. After you open the form builder, you can begin to configure the form in the following ways:

  • Add basic form elements—Basic form elements allow mobile workers to provide information such as dates, numbers, text, and data scanned from barcodes.
  • Add choice form elements—Choice form elements allow mobile workers to select from a list of values that you define.
  • Use fields as form elements—Fields within the layer or table can be added to the form and configured as form elements.

Note:

You can configure forms in the ArcGIS Field Maps web app and the new Map Viewer in ArcGIS Online. To learn how to configure forms in Map Viewer, see Create forms for attribute editing.

You can view and edit forms in the ArcGIS Field Maps mobile app and the new Map Viewer in ArcGIS Online and ArcGIS Enterprise 10.9.1 and later.

Caution:

When you're editing the map, layers, and form in the Field Maps web app, do not simultaneously edit them in a separate browser tab. Editing the map, layers, and form across multiple tabs will result in the loss of your data.

If you're using ArcGIS Enterprise 10.8.1 or 10.9 to configure the form with the Field Maps web app, you must use Map Viewer Beta when editing the map. If you use Map Viewer to edit or save the map, the form you configured in the Field Maps web app will be lost.

If you're using ArcGIS Enterprise 10.8 or earlier, the Field Maps web app is not available. You must configure the form in Map Viewer Classic.

If you're using ArcGIS Online or ArcGIS Enterprise 10.9.1 or later, you can use the new Map Viewer or Map Viewer Classic when editing the map.

Open the form builder

Use the form builder in the Field Maps web app to create the form mobile workers use in the field. Open the form builder by completing the following steps:

  1. In a browser, sign in to your organization and open the Field Maps web app from the app launcher in ArcGIS Online or the app launcher in ArcGIS Enterprise.

    The Maps page appears, displaying maps that you own and maps included in any shared update groups of which you're a member.

    Note:

    If you're an administrator using ArcGIS Online or ArcGIS Enterprise 10.9.1 or later, you have the option to view and configure any map in your organization. Click Filter and select All maps.

    Viewing and configuring maps shared with you through shared update groups is supported in ArcGIS Enterprise 10.9.1 and later.

  2. Click the map to begin configuring it.

    The Overview page appears, displaying information about the map.

    Tip:

    If you're using ArcGIS Online or ArcGIS Enterprise 10.9.1 or later, you can also open a map in Field Maps from the map's item page. Browse to the map's item page and click Open in Field Maps.

  3. Click Content.

    The Content page appears, listing the items in your map.

  4. Click an editable layer or table.

    The Form builder appears with a blank form canvas.

Once you've opened the Form builder, you can begin configuring the form by dragging form elements onto the canvas. Form elements define the type of information mobile workers provide when filling out the form. You can add basic form elements, choice form elements, or you can use fields as form elements.

Tip:

You can copy a form between maps using ArcGIS API for Python and the copy_form_between_maps Python script or ArcGIS Online Assistant. For step-by-step instructions, see the Duplicate maps and forms for use in Field Maps blog post.

Add basic form elements

Basic form elements allow mobile workers to provide information such as dates, numbers, text, and data scanned from barcodes. Basic form elements are listed in the Form Elements list under BASIC and include the following:

Form elementField typeDescription

Barcode

Double, Integer, or String

Scan a barcode or QR code to enter a value.

Date/Time

Date

Enter a date or time.

Number - Double

Double

Enter a decimal number value such as 1.2.

Number - Integer

Integer

Enter a whole number value such as 2.

Text - Multiline

String

Enter multiple lines of text.

Text - Single line

String

Enter a single line of text.

Double-click a form element or drag it to add it to the form canvas. Once you add a form element, define its display name and field information.

Note:

Adding basic form elements is not currently supported in ArcGIS Enterprise.

Define display name and field information

When form elements are added to the form and saved, they become fields within the layer. These fields store information collected by mobile workers. For example, if you add a Text - Single line form element to the form, a string field is added to the layer.

When you add a form element to the form canvas, the Properties pane appears. Every form element requires a value for the Display name, Field name, and Field type properties. If the field is a string type, a Field length value is also required. Define the display name and field information by completing the following steps:

  1. Add a Display name value.

    The display name is the name that appears on the form and is automatically used as the Field name value.

    Note:

    Any spaces in the Field name value are replaced with underscores and any invalid characters are removed.

  2. Optionally, change the Field name value.

    You can change the field name if you want the name stored in the field to be different than the name displayed in the form. You may want a shorter field name if the display name is long, for example:

    • Display nameProvide additional notes about the inspection
    • Field nameadditional_notes

  3. If you're configuring a Barcode element, select a value for Field type.

    The field type you select depends on the type of information contained in the barcodes scanned by mobile workers.

  4. If you're configuring a form element with a String field type, set a value for Field length.

    The field length indicates the maximum length of the field. The default value for the Text - Single line and Barcode form elements is 256 characters. The default value for the Text - Multiline form element is 1000 characters.

  5. Optionally, provide a default value in the Default value text box.

    Default values are applied to a field whenever a feature is created and are helpful if there are common values that mobile workers enter while collecting data.

  6. Click Save to save the form.

    Once you save the form after adding a new form element, the Field name, Field type, Field length, and Default value properties cannot be changed.

    Tip:

    If you want to change these properties, you must delete the form element from the canvas and delete the field from the Fields list in the Form builder pane. You can then add a new form element and configure its properties.

Format basic elements

After entering the required display name and field information, you can configure additional properties for basic form elements to help streamline data collection in the field. For more information, see the following:

Add choice form elements

Choice form elements allow mobile workers to select from a list of values that you define. Choice form elements are listed in the Form Elements list under CHOICE and include the following:

Form elementField typeDescription

Combo box

Double, Integer, or String

Select from a list of values displayed in a drop-down menu.

Radio buttons

Double, Integer, or String

Select from a list of values displayed as buttons.

Switch

Double, Integer, or String

Select from one of two values displayed as a switch.

Double-click a form element or drag it to add it to the form canvas. Once you add a choice form element, define its display name, field information, and list of values.

Note:

A radio button element is recommend for up to five values. Adding more than five values may require mobile workers to scroll through the form to find their selection. If you have more than five values, a combo box is recommended instead.

Adding choice form elements is not currently supported in ArcGIS Enterprise.

Define display name and field information

When form elements are added to the form and saved, they become fields within the layer. These fields store information collected by mobile workers. For example, if you add a Combo box form element with a string type to the form, a string field is added to the layer.

When you add a form element to the form canvas, the Properties pane appears. Every form element requires a value for the Display name, Field name, and Field type properties. If the field is a string, a Field length value is also required. Define this information by completing the following steps:

  1. Add a Display name value.

    The display name is the name that appears on the form and is automatically used as the Field name value.

    Note:

    Any spaces in the Field name value are replaced with underscores and any invalid characters are removed.

  2. Optionally, change the Field name value.

    You can change the field name if you want the name stored in the field to be different than the name displayed in the form. You may want a shorter field name if the display name is long, for example:

    • Display nameSelect the tree type
    • Field nametree_type

  3. Select a value for Field type.

    The field type is applied to the list of values. Once you create a list of values, you cannot change the field type.

  4. If you're configuring a form element with a String field type, set a value for Field length.

    The field length indicates the maximum length of the field and is applied to the list of values. The default field length is 256 characters.

After you define the display name and field information, create a list of values.

Note:

You cannot save a new choice form element until you create the list of values.

Create a list of values

A list of values (also known as a coded value domain) defines the options mobile workers can choose from when filling out the form. Providing a list of values streamlines data collection in the field and ensures consistency in the data being entered. Each value in a list includes a label and a code:

  • Label—The label is the value displayed when filling out the form in Field Maps and how you want the value to appear to mobile workers. It's also displayed when viewing the attribute table in Map Viewer and other apps.
  • Code—The code is the value stored in the feature layer.

You can add values one-by-one or by uploading a CSV file. How you create a list depends on the type of choice element you're configuring.

Create a list for a combo box or radio buttons

To create a list of values for a combo box or radio buttons element, complete the following steps:

  1. On the Properties pane, click Create list.

    The List of values window appears.

  2. Optionally, populate the list of values by uploading a CSV file.
    1. Ensure your CSV file matches the required formatting shown below.

      The CSV file must contain two columns: one for labels and one for codes. The table below shows the required format for a CSV file that contains three values:

      Label 1

      Code 1

      Label 2

      Code 2

      Label 3

      Code 3

      For best results, encode the CSV file using UTF-8 character encoding. If you're using Microsoft Excel to create your CSV file, save it as CSV UTF-8.

      Caution:

      The codes must use the field type defined for the form element. If the field type is string, the codes must also be less than or equal to the maximum field length defined for the form element.

      Commas are not supported when adding codes in Field Maps and cannot be used as thousands or decimal separators. To add decimal separators in codes, you must use periods.

      If you're editing the raw CSV file outside of Microsoft Excel or similar programs, you must use escaping for values that contain double quotes. For example, if you have a label or code of 24", it must be written as "24""" in the CSV file.

      The CSV file will fail to upload if the codes do not meet these requirements.

    2. Drag the CSV file onto the List of values window or click select from your device to select it from your file explorer.

    The list is populated with the values from your CSV file.

  3. Optionally, add values one-by-one.

    Add values by clicking the Add Add button. Provide a label and code for each value.

    Caution:

    The codes must use the field type defined for the form element. If the field type is string, the codes must also be less than or equal to the maximum field length defined for the form element.

    Commas are not supported when adding codes in Field Maps and cannot be used as thousands or decimal separators. To add decimal separators in codes, you must use periods.

  4. Click Done to create the list.

    After you click Done, you cannot change the field type, or length of the form element.

    The Create list button changes to Manage list with a number in parentheses that represents the number of values in the list.

  5. Optionally, select a default value from the Default value drop-down menu.

    Default values are applied to a field whenever a feature is created and are helpful if there are common values that mobile workers enter while collecting data.

    Note:

    Once you save the form, you cannot change the Default value property.

  6. Once you've defined the display name, field information, and list of values, click Save to save the form.

    Once you save the form after adding a new form element, the Field name, Field type, and Field length properties cannot be changed.

    Tip:

    If you want to change these properties, you must delete the form element from the canvas and delete the field from the Fields list in the Form builder pane. You can then add a new form element and configure its properties.

    To learn how to manage the list after its created, see Manage the list of values.

Create a list for a switch

A switch element includes two values. To create a list of values for a switch element, complete the following steps:

  1. Under Switch values, provide two values for mobile workers to choose from.

    These are the labels for each value. Codes for each value are automatically generated.

  2. Optionally, change the codes for each value by clicking Manage codes.

    The List of values window appears and you can edit the label and code for each value. When you're finished, click Done to close the window.

    After you click Done, you cannot change the field type or length of the form element.

    Caution:

    The codes must use the field type defined for the form element. If the field type is string, the codes must also be less than or equal to the maximum field length defined for the form element.

    Commas are not supported when adding codes in Field Maps and cannot be used as thousands or decimal separators. To add decimal separators in codes, you must use periods.

  3. Under Default value, choose the value you want selected by default in the form. If the switch element does not contain a default value, it displays as a combo box in the form.

    Note:

    Once you save the form, you cannot change the Default value property.

  4. Once you've defined the display name, field information, list of values, and default value, click Save to save the form.

    Once you save the form after adding a new form element, the Field name, Field type, and Field length properties cannot be changed.

    Tip:

    If you want to change these properties, you must delete the form element from the canvas and delete the field from the Fields list in the Form builder pane. You can then add a new form element and configure its properties.

    To learn how to manage the list after its created, see Manage the list of values.

Format choice elements

After you've defined the display name, field information, list of values, and default value, you can configure additional properties for choice form elements to help streamline data collection in the field. For more information, see the following:

Use fields as form elements

Fields within the layer or table can be added to the form and configured as form elements. Once fields are added, you can configure how they appear on the form. If a field includes a list of values, you can manage those as well.

Add fields to the form

Fields within the layer appear in the Fields list next to the form canvas. You can add fields to the form in one or more of the following ways:

  • Add fields one by one—To add a single field to the form, double-click it or drag it onto the form canvas.
  • Add a selection of fields to the form—To add multiple fields to the form, press the control key and click the fields you want to include, then drag them to the form canvas.
    Note:

    Using the control key to add a selection of fields is supported on ArcGIS Enterprise 10.9.1 and later.

  • Add all fields to the form—To include all fields in the form, click Add all in the Fields list.
  • Convert the pop-up—If you configured the form as a pop-up in Map Viewer Classic, you can configure the form using the existing pop-up configuration. On the blank form canvas, click Convert pop-up. Editable fields from the pop-up are added to the canvas and placed in their original order. Fields that are not part of the pop-up configuration appear in the Fields list.

Tip:

If the layer or table contains a large number of fields, you can use the Find Fields search bar in the Fields list to locate a specific field.

If fields are required, they appear in the REQUIRED section of the Fields list and must be added to the form. Fields appear in the required section for one or both of the following reasons:

  • The field was configured to not allow null values when it was created in ArcGIS Online, ArcGIS Enterprise, or ArcGIS Pro.
  • The field was configured as part of a restrictive contingent field group in ArcGIS Pro.

Any fields that are part of a contingent field group should be added to the form and grouped together. If there are overlapping field groups, meaning two or more field groups share a common field, all participating fields should be added to the same group on the form. To learn how contingent values work in the mobile app, see Select contingent values.

Caution:

If fields with contingent values are not added to the form canvas, mobile workers may not be able to submit the form in the Field Maps mobile app.

Configure fields as form elements

Once fields have been added to the form canvas, they can be configured as form elements. Configure how fields appear in the form by completing the following steps:

  1. Select the field you want to configure.

    The Properties pane appears.

  2. Select the input type.

    The input type defines how the form element appears in Field Maps. The input type you select depends on the field type and whether the field contains a list of values.

    If the field does not contain a list of values, and you don't want to create a list of values, select one of the following options from the Input type drop-down menu:

    Input typeField typeDescription

    Barcode

    Double, Integer, or String

    Scan a barcode or QR code to enter a value.

    Date

    Date

    Enter a date.

    Date and time

    Date

    Enter a date and time.

    Number - Double

    Double

    Enter a decimal number value such as 1.2.

    Number - Integer

    Integer

    Enter a whole number value such as 2.

    Text - Multiline

    String

    Enter multiple lines of text.

    Text - Single line

    String

    Enter a single line of text.

    If the field does contain a list of values, or if you want to create a list of values, select one of the following options from the Input type drop-down menu:

    Input typeField typeDescription

    Combo box

    Double, Integer, or String

    Select from a list of values displayed in a drop-down menu.

    Radio buttons

    Double, Integer, or String

    Select from a list of values displayed as buttons.

    Switch

    Double, Integer, or String

    Select one of two options displayed as a switch.

    Note:

    A radio button element is recommend for up to five values. Adding more than five values may require mobile workers to scroll through the form to find their selection. If you have more than five values, a combo box is recommended instead.

    To learn how to create a list of values for a field, see Create a list of values.

    If a switch element does not contain a default value, it displays as a combo box in the form. You can set a default value for an existing field by managing feature templates.

    The Radio buttons and Switch input types are supported on ArcGIS Enterprise 10.9.1 and later.

  3. Configure additional properties.

    Once you've selected the input type, there are additional form element properties you can configure to streamline data entry in the field. You can also manage the list of values for combo box, radio buttons, and switch elements. To learn about the different ways you can configure form elements, see the following:

Provide a title

Include identifying information in the title so mobile workers choose the correct form. By default, the title of the form is the name of the layer or table.

  1. While configuring the form, click the current title.
  2. Provide a title that mobile workers can easily identify.
  3. Click Save.
Tip:

If you're using ArcGIS Online or ArcGIS Enterprise 10.9.1 or later, click Add field in the Formatting pane to include a field value in the title.

Order the elements on the form

Order the form elements in a way that makes it easier for mobile workers to provide information in the field. If you have a long form, list the required elements first so mobile workers don't have to search for the key items.

  1. While configuring the form, drag form elements to order them on the form canvas or select a form element and use the arrow keys to move it up or down.
  2. Click Save.
Tip:

If you're using ArcGIS Online or ArcGIS Enterprise 10.9.1 or later, you can select multiple form elements by pressing the Ctrl key and clicking each element.

Group elements together

If you have related information in the form, you can group it together, similar to sections of a paper form. Group form elements using the Group element in the Form Elements list.

  1. While configuring the form, click a Group element from the Form Elements list.

    A form element is added to the form canvas.

  2. Drag form elements into the group.
  3. Select the group element to edit its properties.

    The Properties pane appears, allowing you to edit the following information:

    • Display name—Provide a name for the group that describes its fields.
    • Description—Provide a description for the group.
    • Initial state—Check this check box if you want the initial state of the group to be expanded in the mobile app.
    • Conditional visibility—Add an Arcade attribute expression to apply rules for when the group should appear in the form. See Conditional visibility for details.

  4. Click Save.
Tip:

If you're using ArcGIS Online or ArcGIS Enterprise 10.9.1 or later, you can remove all form elements from a group by selecting Ungroup from the group toolbar. You can remove multiple elements from the group by pressing Ctrl, selecting each element you want to remove, and dragging them out of the group.

Update labels (display names)

In Field Maps, the Display name text is used as the label of the form element. Provide a name or short question familiar to your mobile workers.

Tip:

Keep labels short and concise. While you can use a question, Field Maps scales the text to fit on a single line in the form.

  1. While configuring the form, click a form element to open the Properties pane.
  2. In the Formatting section, edit the Display name text to change the element's label on the form.
  3. Click Save.

Format text elements

Text elements can be configured to use a text box or text area. A minimum and maximum character count can also be configured for each text element.

  1. While configuring the form, click a form element that requires text to open the Properties pane.
  2. In the Formatting section, click the Input type drop-down menu and select one of the options.
    • Text - Single line—Allow the mobile worker to provide one line of text.
    • Text - Multiline —Allow the mobile worker to provide multiple lines of text.
  3. In the Formatting section, set values for Min. length and Max. length for the element.
  4. Click Save.

Format date elements

Date elements can be configured to use a date picker or a date and time picker. A range can also be set for each date element.

  1. While configuring the form, click a form element that requires a date to open the Properties pane.
  2. In the Formatting section, click the Input type drop-down menu and select one of the options.
    • Date—Allow the mobile worker to provide a date.
    • Date and time—Allow the mobile worker to provide a date and time.
  3. In the Formatting section, set values for the Start date, Start time, End date, and End time properties that mobile workers can choose from.
  4. Click Save.

Format barcode and QR code elements

If your assets include barcodes or QR codes, you can scan the barcode or QR code with the Field Maps mobile app and populate one or more entries based on the scan. In Field Maps, text and numeric entries with the Barcode scanner input type contain an option for scanning a barcode or QR code. When a mobile worker chooses Scan barcode or QR code Scan barcode or QR code, the device's camera app opens and reads the barcode or QR code. The information it contains populates the selected entry when the scan is complete.

Note:

The Barcode scanner input type is supported on ArcGIS Enterprise 10.9.1 and later.

  1. While configuring the form, click a field that requires a barcode or QR code element to open the Properties pane.
  2. In the Formatting section, click the Input type drop-down menu and select Barcode scanner.
  3. Click Save.
Note:

Field Maps supports the barcode and QR code formats supported by the operating system. For Android support, see Scan Barcodes with ML Kit on Android. For iOS support, see Machine-Readable Object Types.

Provide hints

In Field Maps, the Placeholder text is used to display informative hint text for an entry without a value. For example, you can provide information about where the mobile worker obtains the information or details about how to format the information when entered.

Note:

Placeholder text for date fields or fields with coded value domains does not display in the Field Maps mobile app.

  1. While configuring the form, click a form element to open the Properties pane.
  2. In the Formatting section, edit the Placeholder text to change the hint text for the element.
  3. Click Save.

Provide descriptions

The Description text is used to provide contextual information that describes the purpose of a form element.

Note:

Description text is supported on ArcGIS Enterprise 10.9.1 and later.

  1. While configuring the form, click a form element to open the Properties pane.
  2. In the Formatting section, edit the Description text to change the description for the element.
  3. Click Save.

Manage a list of values

If your form element contains a list of values (also known as a coded value domain), you can edit those values in the form builder. How you manage a list depends on the type of choice element you're configuring.

Note:

If you want to create a list of values for a field or form element, see one of the following:

If you created a coded value domain for a date field in ArcGIS Pro, you cannot manage its list of values in the Field Maps web app.

Managing a list of values is not currently supported in ArcGIS Enterprise.

Manage the list for a combo box or radio buttons

Manage the list of values for a combo box or radio buttons element by completing the following steps:

  1. Select the form element.

    The Properties pane appears.

    Note:

    You can change the input type for the list of values by selecting an option from the Input type drop-down menu.

  2. Click Manage list
    Note:

    The number in parentheses in the Manage list button represents the number of values in the list.

    The List of values window appears.

  3. Manage the list of values in one or more of the following ways:
    • Add values by clicking the Add Add button.
    • Edit the labels and codes.
    • Reorder the values by dragging them or selecting them and using the arrow keys.
    • Replace the list of values by dragging a CSV file containing label and code values onto the window. The CSV file must match the required formatting. For best results, encode the CSV file using UTF-8 character encoding. If you're using Microsoft Excel to create your CSV file, save it as CSV UTF-8.

    Caution:

    The codes must use the field type defined for the form element. If the field type is string, the codes must also be less than or equal to the maximum field length defined for the form element.

    Commas are not supported when adding codes in Field Maps and cannot be used as thousands or decimal separators. To add decimal separators in codes, you must use periods.

    If you're editing the raw CSV file outside of Excel or similar programs, you must use escaping for values that contain double quotes. For example, if you have a label or code of 24", it must be written as "24""" in the CSV file.

    If a value is used in an expression, editing its code may cause an error in the form.

  4. When you're done managing the list of values, click Done to close the window.
  5. Click Save to save the form.

Manage the list for a switch

Manage a list of values for a switch element by completing the following steps:

  1. Select the form element.

    The Properties pane appears.

    Note:

    You can change the input type for the list of values by selecting an option from the Input type drop-down menu.

  2. Manage the list of values in one or more of the following ways:
    • Edit the labels under Switch values.
    • Reorder the values by clicking the Switch order of values Switch order of values button.
    • Edit the codes in the List of values window by clicking Manage codes. When you're done editing the codes, click Done to close the window.

    Note:

    The codes must use the field type defined for the form element. If the field type is string, the codes must also be less than or equal to the maximum field length defined for the form element.

    If a value is used in an expression, editing its code may cause an error in the form.

  3. Click Save to save the form.

Require form elements

You can configure form elements so mobile workers are required to provide a value before submitting the form. For example, if all inspections require an inspection ID, you can require that value in the form. If you require a form element, you must also decide whether null values are allowed in the feature layer for that field. Require form elements by completing the following steps:

  1. While configuring the form, click a form element to open the Properties pane.
  2. In the Formatting section, enable the Required check box to require a value in Field Maps.
  3. Decide if null values are allowed in the feature layer by selecting Yes or No.

    If null values are allowed, the field is not required when editing the feature layer outside of the form. If the layer has one or more records, you must allow null values.

    Note:

    If you're using ArcGIS Enterprise, this option is not available.

  4. Click Save.

    Required elements are indicated in the form by an asterisk next to the display name and prevent submission until a value is provided.

Set default values

Default values are applied to a field whenever a feature is created and are helpful if there are common values that mobile workers enter while collecting data. You can set default values while creating new form elements in ArcGIS Field Maps or while creating new fields in ArcGIS Online, ArcGIS Enterprise, or ArcGIS Pro. To learn how to set default values while creating form elements or fields, see one of the following:

Default values that are specified as part of a feature template are applied to the field when the feature template is used to create a feature. This allows you to have different default values for a single field depending on the type of feature that is being created. If a field has an existing default value, the default for a feature template overrides it and is used. To provide default values for a feature template, see Manage feature templates.

Disable editing

By default, fields in the form are enabled for editing; however, you can change the setting so mobile workers cannot edit the fields. Read-only elements allow mobile workers access to information, but prevent them from editing it.

  1. While configuring the form, click a form element to open the Properties pane.
  2. In the Formatting section, uncheck the Allow mobile users to edit check box to prevent mobile workers from editing the field.
  3. Click Save.

Add Arcade expressions

You can create expressions using ArcGIS Arcade to streamline and automate data entry in the form. You can create the following expressions in Field Maps:

Add calculated expressions

Calculated expressions automatically calculate and populate data in the form, saving time for mobile workers in the field. You can build calculated expressions in a variety of ways with Arcade, including using feature attributes, geometry, and account information for the signed-in user.

Calculated expressions are dynamic, meaning they automatically update the form as information changes. As a result, mobile workers are able to see the updated calculation before submitting the form. To create a calculated expression, complete the following steps:

Note:

Calculated expressions are not currently supported in ArcGIS Enterprise

  1. While configuring the form, click a form element to open the Properties pane.
    Caution:

    If the Allow editing check box is checked, the expression will not run.

  2. In the Calculated expressions section, click + Add expression.

    The Arcade editor appears. The editor allows you to write and test your expression before saving it to the selected form element.

  3. Click Edit next to the title and provide a title for the expression.
  4. Write the calculated expression.

    For example, the following expression checks whether polygon feature geometry is null before calculating the area in square meters. Additional examples are provided below.

    if (IsEmpty(Geometry($feature))){
        return;
    }
    else{
        Area($feature, 'square-meters')
    }
    To learn more about calculating area with Arcade, see Area (Geometry Functions).

  5. Click Test to make sure the expression doesn't result in an error.
  6. Click OK to close the Arcade editor.

    The calculated expression is applied to the form element.

  7. Click Save to save the expression and the form.

    Now that you've saved your expression, you can apply it to any form element by selecting the form element and clicking the expression you created. You can see which elements are using the Arcade expression by clicking the number next to the expression in the Properties pane under Calculated expressions.

    Note:

    You can duplicate, edit, or delete the expression at any time from the Calculated expressions menu.

The following are examples of calculated expressions:

  • Provide date information—The following expression provides the current date for a date field:
    return Today();
    To learn more about date information you can access with Arcade, see Date Functions.
  • Include account information for the signed-in user—The following expression returns the full name of the user signed in to Field Maps:
    var userInfo = GetUser(portal("https://www.arcgis.com"),"")return (userinfo["fullName"])
    To learn more about account information you can access with Arcade, see GetUser (Data Functions).
  • Extract information from intersecting layers—The following expression is applied to a zipcode field in the form. It checks whether the feature geometry is null and then extracts a zipcode value from an intersecting parcel layer:
    if (IsEmpty(Geometry($feature))){
        return;
    }
    else{
        var parcels_FS = Intersects($feature, FeatureSetByName($map,"Redlands parcels")); 
         if (Count(parcels_FS) == 1){ 
           return Text(First(parcels_FS).ZIP_CODE);
         }
    }
    To learn more about extracting information from intersecting layers with Arcade, see Intersects (Geometry Functions).

For a list of all the functions offered in Arcade, see the Arcade Function Index.

Add conditional visibility expressions

You can conditionally show or hide form elements in the form based on values added to previous fields. For example, a Building Assessment form includes a field to indicate whether there is water damage. It also includes a group form element containing fields related to water damage. A conditional visibility expression can be applied to the water damage group so it only appears if water damage is indicated in the earlier field. To create a conditional visibility expression, complete the following steps:

  1. While configuring the form, click a field or group to open the Properties pane.
  2. In the Conditional Visibility section, click + Add expression.

    The Edit expression window appears. The editor allows you to write your expression and preview it in Arcade before saving it to the selected field or group.

    Note:

    If you're using ArcGIS Enterprise, the Arcade editor appears instead. You can use the editor to create conditional visibility expressions using Arcade.

  3. Click Edit next to the title and provide a title for the expression.
  4. Build the expression.

    Each expression is defined by one or more conditions. A condition includes a field name, an operator, and potentially, a value. The list of available operators is determined by the type of field (string, number, or date).

    For example, if a water damage group element only needs to appear if water damage was indicated in an earlier field, the following condition can be used to build the expression:

    • Field name—Water damage
    • Operator—is
    • Value—Yes

    Here is what the same expression looks like in Arcade syntax:

    DomainName($feature, "water_damage") == "Yes"
    Note:

    To create more complex expressions, click Launch Arcade editor.

    If you use multiple conditions, you can choose whether all conditions must be true or only one condition must be true for the form element to be displayed.

    The Field Maps web app applies the Arcade Constraint profile to evaluate whether a feature meets the criteria defined in the expression. If a value other than Yes is indicated in the water_damage field, the water damage group will not appear in the form.

    Note:

    If the expression evaluates to false and the form element becomes hidden in the form, the value for the field is cleared. If a group form element becomes hidden, all values it contains are cleared.

  5. Click Save.

    The conditional visibility expression is applied to the group or field.

    Now that you've saved your expression, you can apply it to any form element by selecting the form element and clicking the expression you created. You can see which elements are using the Arcade expression by clicking the number next to the expression in the Properties pane under Conditional Visibility.

    Note:

    You can duplicate, edit, or delete the expression at any time from the Conditional Visibility menu. To edit the expression using Arcade, click Edit (advanced) from this menu.

Format high-accuracy metadata display

Fields that contain high-accuracy metadata don't appear in the form or in the Fields list. If you are displaying high-accuracy metadata in the pop-up, format the numbers to use an appropriate number of decimal places. If you're displaying the fix time, format the date.

Known issues

Known issues for building a form in the Field Maps web app and instructions for how to resolve them are provided below.

Unable to configure the form for a table

If a table is related to a layer with GNSS fields, you cannot configure its form, however, you can configure the form for a copy of the table. To create a copy of a related table, complete the following steps:

  1. Browse to the item page for the layer that contains the GNSS fields and click the Visualization tab.
  2. Click Save as new layer and provide a title.
  3. Click Save.

    A copy of the layer and the related table are created and added to My content.

  4. Return to the Field Maps web app.

    You can now configure the form for the copy of the table.