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 on the widget, which turns it dark green.
- Hover over the widget and click the Configure this widget button to open the configuration properties dialog box.
- 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.
- For each layer, check or uncheck the following:
- Editable
- Update Only
- Allow Delete
- Disable Geometry Editing
- Click the button under the Description column.
Provide text on the dialog box to help users perform edits.
- Click the Edit button 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 to configure smart attribute settings for this field. The Attribute actions button allows you to configure field values by intersection, address, coordinate, or preset.
- For each field, check or uncheck the Display and Editable check boxes.
- Click the Edit button 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 to configure the logic that determines when the action is valid or processed.
- Action—There are three actions available:
- Click the Edit button 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. - Once you've configured smart attributes, click OK to close the dialog box. Click the Attribute Actions button 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.
- Intersection—Populate this field based on a field value from an intersected layer.
- Criteria—Use the up and down arrows to reorder the action list. Use the Edit button to configure the logic that determines when the action is valid or processed.
- Click the Edit button 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.
- On the Attribute Actions dialog box, click the Edit button 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.
- To change to a custom geocoder, go to the Geocoder Settings button in general settings.
- 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.
- Select the field you want to use to populate the edited feature.
- On the Attribute Actions dialog box, click the Edit button 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.
- Close all the smart attribute dialog boxes and return to the Layer Settings panel.
- 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.
- 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.
- 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.
- 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.
- If you have configured fields to include in the preset list, enter their values.
- 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.
Once you've added a feature, the page transitions to the attributes.
- 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.
- 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.
- To edit a feature, click it on the map to open its attributes and edit the information.
- 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.