Smart Editor widget

(Added at v2.1)

The Smart Editor widget provides a streamlined editing experience and allows you to edit features and their related records. You can configure attributes to be hidden, required, or disabled dynamically. You can set up automatic calculations for attributes using values from other layers, such as location information in an address or coordinate format. The Smart Editor widget also allows you to set attributes once and apply those settings to all newly created features. Descriptive information can be controlled for the editor form by providing custom display text. Map navigation can be locked in the layer settings for easier editing on a touch-screen device.

Configure the Smart Editor widget

This widget can be set to open automatically when an app starts. To enable this feature, click the Open this widget automatically when the app starts button Open this widget automatically when the app starts on the widget, which turns it dark green.

  1. Hover over the widget and click the Configure this widget button Configure this widget to open the configuration properties dialog box.
  2. Optionally click Change widget icon and replace the default icon for this widget with an image of your own.
    A file explorer window appears, allowing you to choose a local image file to use as the widget icon.

There are two sections to consider when configuring the Smart Editor widget: layer settings and general settings.

Layer settings

The layer settings list all the editable layers in the map and provide functionality to control the capabilities and actions of each layer. Details for each options are as follows:

  • Editable—Allow only certain layers to be editable.
  • Update Only—Optionally limit the layer to only update or modify existing features.
  • Allow Delete—Optionally allow a feature to be deleted.
  • Disable Geometry Editing—Optionally allow the reshaping and moving of a feature's geometry.
  • Description—Optionally provide a description above the attributes for each layer.
  • Actions—Select which fields are editable and visible, and define the smart attributes actions and attribute actions. Allow access to a related layer of a table if available. By default, the widget carries over the display and editable attributes configured in the map.
Tip:

This widget does not override the edit settings in the web map and service. If the layer is set to only allow updates, the widget will not allow you to create or delete features.

  1. For each layer, check or uncheck the following:
    • Editable
    • Update Only
    • Allow Delete
    • Disable Geometry Editing
  2. Click the button under the Description column.

    Provide text on the dialog box to help users perform edits.

  3. Click the Edit button Edit under Actions.

    The dialog box lists all the fields for the layer. Database-required fields are noted with a red asterisk (*). Details for each column are as follows:

    • Display—Show this field on the attribute dialog box.
    • Editable—Determine whether the field is editable. Noneditable fields are shown but are disabled.
    • Name—Displayed for reference.
    • Alias—Displayed for reference.
    • Actions—Use the up and down arrows to reorder the field list. Use the Edit button Edit to configure smart attribute settings for this field. The Attribute actions button Attribute actions button allows you to configure field values by intersection, address, coordinate, or preset.
  4. For each field, check or uncheck the Display and Editable check boxes.
  5. Click the Edit button Edit under Actions.

    You can use the smart attributes dialog box to set three actions on a field. Only one action can be performed at a time, and they are evaluated in their listed order. Details for each column are as follows:

    • Action—There are three actions available:
      • Hide—Hide this field based on a criteria in another field.
      • Required—Mandate that this field have a value. The Save button is not enabled until this action is configured.
      • Disabled—This field can't be configured based on the criteria from other fields, but the field will be shown.
    • Expression—Show the SQL for that expression once an action is configured.
    • Criteria—Use the up and down arrows to reorder the action list. Use the Edit button Edit to configure the logic that determines when the action is valid or processed.
  6. Click the Edit button Edit under the Criteria column for each action. Click Add a filter expression or Add an expression set to create your expression on the Configure clause dialog box.

    Tip:
    When the Hide action is configured, the Submit attribute data for this field even when hidden? option allows you to save the data in a field when it's not displayed. If you don't want to save the data in a hidden field, uncheck this option.

  7. Once you've configured smart attributes, click OK to close the dialog box. Click the Attribute Actions button Attribute Actions under the Actions column for each field.
    • Enabled—Check this box to use this action.
    • Actions—There are four actions available as follows:
      • Intersection—Populate this field based on a field value from an intersected layer.

        If the edited feature intersects multiple values, the record will be sorted by object ID, and the first object will be used.

      • Address—Populate this field based on a field defined in a locator service.

        If multiple results are returned from the locator, the highest matching score will be used.

      • Coordinates—Populate this field based on coordinates. Coordinates can be latitude/longitude or the coordinate system of the map.
      • Preset—Populate this field with a preset value. This function is only for creating new records. Defining the value for the preset is handled on the General Settings tab.
    • Criteria—Use the up and down arrows to reorder the action list. Use the Edit button Edit to configure the logic that determines when the action is valid or processed.
  8. Click the Edit button Edit under the Criteria column for the Intersection action.

    Click the add button to add a layer to intersect.

    Tip:

    If you have multiple layers defined for an intersected value, the widget searches from top to bottom on this list for an intersected value. Once the first successful value is found, all other layers in the list are ignored.

  9. On the Attribute Actions dialog box, click the Edit button Edit under the Criteria column for the Address action. If this is the first time you've accessed this section your organization’s default locator will be displayed here. You can change this to any other custom geocoder you have.
    1. To change to a custom geocoder, go to the Geocoder Settings button in general settings.
    2. Click Validate to ensure that the locator is usable.

      Once a valid locator is defined, a list of fields in the locator is presented in a menu window.

    3. Select the field you want to use to populate the edited feature.
  10. On the Attribute Actions dialog box, click the Edit button Edit under the Criteria column for the Coordinates action.

    The Coordinate System drop-down menu has two options. You can use the map’s current spatial reference or latitude/longitude. The Attribute drop-down menu lists the available coordinate fields and is used to populate the field being configured.

    Tip:

    If you're creating or updating a polygon, the coordinates of the centroid of the polygon are used. If you're creating or updating a line, the starting point is used.

  11. Close all the smart attribute dialog boxes and return to the Layer Settings panel.
  12. If you have relationships in your map, a table button is available under Actions. Click the table button to access a layer's related layer or table.

    Only parent- to-child relationships are shown. This is different from the identify pop-up in the Edit widget. If a child relationship is editable but the parent is not, the parent layer is shown but all attributes are disabled. If the parent relationship is editable but the children are not , these attributes are not displayed.

  13. Above the table is a breadcrumb showing where you previously browsed in this relationship hierarchy. Click a segment in the breadcrumb to load that item into the table.

    The table shows your current level. All related items will be listed. The options are as follows:

    • Editable—Allow the related layer or table to be editable.
    • Update Only—Optionally limit the layer to only update or modify existing features or records. The Editable option must be checked to enable this function. If the related item is a feature layer, this will be checked and unavailable. This widget prevents you from creating new related features; you can only edit the attributes of existing related features.
    • Allow Delete—Optionally allow features or records to be deleted. The Editable option must be checked to enable this function.
    • Disable Geometry Editing—This option is unavailable for all related items.
    • Description—Optionally provide a description above the attributes for each layer. This option opens the Description dialog box.
    • Actions—Select which fields are editable, visible, and included in the preset value list, and define the smart attributes and field actions. Allow access to a related layer or table if available.

General settings

This section lists settings for the widget that allow you to control the validation and user interface. You can define preset values or use geocoder settings.

  • Define Preset Values—If you configured a field in your feature layer or table to have a preset value, browse to the Define Preset Values parameter in the General settings. This is where you define its default value when the widget loads. If you set a preset on multiple layers with the same field name, all the layers will use the same defined preset value.
  • Geocoder Settings—If you configured a field in your feature layer or table to get its value from an address, browse to the Geocoder Settings to define the geocoder URL.

    By default, the geocoder is populated with the geocoder defined in your organization. If you change the URL, change the field association of the fields with this attribute action as well.

The following are options in the general settings:

  • Feature Template and Filter Value
    • Show drawing options—Display a list of valid drawing options for the selected template.
    • Display preset value list on top—Display the preset value list above the template picker.
    • Use feature template filter—The feature template filter presents the keyword and layer filter to narrow the list of edit templates. Check the box to enable this option.
    • Keep selected template active—Keep the selected template active.
    • Apply filter values from Group Filter widget to Preset fields—Apply filter values from the Group Filter widget to the preset fields.
  • Save
    • Position of Save, Delete, Back and Clear buttons— Display the buttons above or below the form.
    • Prompt to save unsaved edits when form is closed or switched to the next record—Display a prompt when leaving the attribute page of the current record if there are unsaved edits.
    • Require confirmation when deleting a record—Display a prompt when deleting a record.
    • Save new feature automatically—Automatically save edits so you can quickly digitize new features.
    • Remove feature from selection on save—Transition to the next record or back to the Edit Template page when there is only one record.
  • Geometry
    • Enable geometry edit by default—Enable geometry edits by default so you can quickly modify the shape of a feature.
    • Show Attribute Actions update button when edit geometry is active—If you defined attribute actions on any field, this option allows you to update the values derived from attribute actions when you change a feature's geometry.
      • Automatically call Attribute Action after geometry update—This option automatically updates the value derived from attribute actions on any field when you change a feature’s geometry.
    • Enable locking of map navigation— Lock map navigation to help with editing on touch-screen devices.
    • Enable moving of selected point feature to GPS location— Enable a point feature to move to the current GPS location.
    • Enable moving of selected point feature to XY location— Enable a point to move to a specified XY location using the map’s current spatial reference or latitude/longitude in decimal degrees.

  1. In the Provide display text for the edit panel section, change or remove the text shown above the feature template list. Provide text to help your users preform their edits. This is useful if no layers allow the creation of new features, and the template list is hidden.
  2. Click OK to close the configuration window.

Use the Smart Editor widget

Open the Smart Editor widget to display the template picker and preset value list. If the layer you want to edit does not appear in the template picker, ensure that Editable is checked for the layer in the configuration and the layer is visible on the map.

  1. If you have configured fields to include in the preset list, enter their values.
    Enter preset values
  2. To add a feature, click its symbol in the template and click to add or draw it on the map. If your configuration includes the feature template filter, you can search for a template.
    Feature template filter

    Once you've added a feature, the page transitions to the attributes.

  3. Enter information in the available fields. The fields vary based on the editable attribute fields in the feature service and the configuration of the editable layer.
    Enter attribute value
  4. To attach an image or other files with a feature (when available), click Browse in the Attachments section of the pop-up and browse to the file on your computer.
  5. To edit a feature, click it on the map to open its attributes and edit the information.
  6. To remove a feature, click it on the map to open its attributes and click Delete.

The Smart Editor widget can also be accessed from a selected feature's pop-up feature action.

Smart editor in pop-up