The Smart Editor widget extends the Edit widget with the following features:
- Attribute editing is performed in the panel and not in the pop-up.
- The ability to hide, require, or disable a field based on the values of other fields.
- New features and changes to existing features are not pushed to the service until you click Save.
- The ability to view pop-ups from other data on the map while editing.
- The ability to preset field values across many fields on many layers and apply them to every new feature.
- The ability to edit a series of features.
- The option to move or modify existing geometry.
- Only changed attributes are submitted to the service instead of the entire record.
- The option to update a feature's attribute only.
- Configurable descriptions are available on both the widget and for each layer.
- An optional filter for the templates is available so you can quickly find the edit template.
Caution:
If the Attribute Table does not display the editor's name correctly when the editor tracking is enabled in the feature layer, see this technical article for a possible workaround.
Configuring the Smart Editor widget
The Smart Editor widget can be set to open automatically when an app starts. To do so, click the dot on the widget to turn it dark green.
- Hover over the widget and click the small edit icon . The configuration window for this widget opens.
- Optionally click change widget icon if you want to replace the default icon for this widget. A file explorer window opens, allowing you to choose a local image file to use as the widget icon.
- Layer settings lists all the editable layers in the map and provides the ability to control the capabilities and actions for each layer. Details for each column are below.
- Editable—Allow only certain layers to be editable; check the boxes accordingly.
- Update Only—Option to limit this layer to only update or modify existing features. If Allow Delete is also checked, the feature can be deleted.
- Allow Delete—Option to allow or not allow the user to delete a feature.
- Disable Geometry Editing—Option to allow or not allow the reshaping and moving of a features geometry.
- Description—Optional parameter to provide a description above the attributes for each layer. This control opens the Description dialog box.
- Fields—Select which fields are editable, visible, included in the preset value list, and defines the smart attributes. 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 boxes of Editable, Update Only, Allow Delete, and Disable Geometry Editing.
- Click the icon under the Description column. Enter the text in the dialog box to help users perform edits.
- Click the pencil icon under Fields. The dialog box lists all the fields for the layer. Database required fields are noted with a red asterisk(*). Details for each column are below.
- Display—Determines whether or not to show this field in the attribute dialog box.
- Editable—Determines if the field is editable or not in the attribute dialog box. Noneditable fields are shown but are disabled.
- Preset—When checked, the field will be added to the preset value list. All fields with the same database name will be grouped together. If fields have a different alias, each will be shown, separated by a comma (,). The preset value list provides the ability to set a value prior to editing. This value is never removed, so it can be applied to any number of edits. These values will override the template defaults. Preset is only for new features.
- Name—Is displayed for reference.
- Alias—Is displayed for reference.
- Actions—The up and down arrows provide the ability to reorder the field list. The pencil icon allows you to configure smart attribute settings for this field.
- For each field, check or uncheck the boxes for Display, Editable, and Preset.
- Click the pencil icon under Actions. The smart attributes dialog box provides the ability 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 below.
- Action—Has three actions as shown below.
- Hide—Hides this field based on a criteria in another field.
- Required—Mandates that this field has a value. The Save button will not be enabled until it does.
- Disabled—Does not allow this field to be manipulated based on the criteria from other fields, but the field will be shown.
- Expression—Shows the SQL for that expression once an action is configured.
- Criteria—The up and down arrows provide the ability to reoder the action list. The pencil icon allows you to configure the logic that determines when the action is valid or processed.
- Action—Has three actions as shown below.
- Click the pencil icon under the Criteria column for each action. Click Add a filter expression or Add an expression set to create your expression in 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 is not displayed. By unchecking this option, a value in a field hidden by the Smart Attributes will not be saved.
- The General settings section lists settings for the widget that allow you to control the validation and user interface.
- Use feature template filter—The feature template filter presents the keyword and layer filter to narrow down the list of edit templates. Check the box to enable this option.
- Prompt to save unsaved edits when form is closed or switched to the next record—Option to display a prompt when leaving the attribute page of the current record if there are unsaved edits.
- Require confirmation when deleting a record—Option to display a prompt when deleting a record.
- Remove feature from selection on save—Option to transition to the next record or back to the Edit Template page when there is only one record.
- The Provide display text for the edit panel section provides the ability to change or remove the text shown above the feature template list. Enter text to help your users preform their edits. This is especially useful if no layers allow the creation of new features and the template list is hidden.
- Click OK to save and close the configuration window.
Using 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 show in the template picker, make sure that Editable is checked for the layer in the configuration and the layer is visible on the map.
- If you have configured fields to be included in the Preset list, fill in their values.
- To add a feature, click its symbol in the template and click to add or draw it on the map. If you have configured to use the feature template filter, you can search for a template.
- Once you have added a feature, the page transitions to the attributes.
- Enter information into 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.