We’re excited to announce that Map Viewer now supports editing related records. For many agencies and organizations, editing related records is integral to their workflows. Such workflows might include routine data collection for maintenance inspections or updating records with frequently changing attributes. Whatever the case is, related records can help you to better manage and understand your data.
You may already be familiar with editing features in Map Viewer. With the June 2023 ArcGIS Online update, we’ve added the ability to edit related records as well. You can now add, update, and delete related records without leaving Map Viewer.
Map Viewer supports editing related records for ArcGIS Online hosted feature services that have a related table.* This means in order to get started, you’ll need a feature layer that has been published to ArcGIS Online with a related table.
*Note: As of October 2023, Feature-to-Feature relationships are additionally supported in ArcGIS Online. To learn more, check out this blog on Feature-to-Feature editing in Map Viewer.
In this article, we’ll cover:
- What’s new with related records in Map Viewer
- What you can do with related records
- Supported relationships
- Configuring related records in Map Viewer
What’s new with related records in Map Viewer
With the latest update to Map Viewer, you can now edit related records. Let’s look at some new functionality we’ve added to help you get started, including a related records element and support for authoring forms for related tables. Combining the two allows you to create optimized workflows for editing related records right inside of Map Viewer.
Related records element
When you create a form in Map Viewer, you specify what elements the form contains and how they appear. Now, we have added a new form element for related records. When you’re creating a form for a layer that has one or more related tables*, you will now see a new form element for related records under ‘Form elements’.
To add the element to the form, you can either drag and drop or simply click ‘Add all’. With this simple action, editors will now be able to edit features in the layer and the records in the related table.
*Note: As of October 2023, you will be able to add the related form element to related features as well.
Forms for related tables
Another option we’ve added is the ability to author forms for related tables. Using the form builder, you can format fields, set the field properties, and use Arcade to author calculated expressions.
The related record element and the related table form work in tandem, allowing you to streamline related record data editing workflows.
One example of an authoring workflow is:
- Author a form (Form A) for the Layer- adding the new related record element to the form.
- Author a form for the Table (Form B).
This enables the following editing workflow:
When editors open ‘Form A’, they’ll see new capabilities, including options to:
- Add a new related record or
- View and edit existing related records
When an editor clicks to add or edit records, ‘Form B’ opens.
We’ll take a look at these options and forms inside Map Viewer in the next section.
What you can do with related records
View an existing related record
When a feature contains a related record, you’ll see an element with a table icon. Click on the element to open the related record. Once open, you can view or edit values for the existing record. This experience of viewing and navigating through related records in the form is similar to viewing related records in pop-ups.
If the feature has no related records, the form contains a message stating that ‘No records were found’.
Edit an existing related record
Once inside the related record, you can begin editing. Click to change the values in any of the editable fields, and click Update to save changes. Alternately, you can click the Delete button to remove the record entirely.
Add a new related record
To create a new record, click on the Add record button. You can then fill in attribute fields and Create a new record.
Supported relationships
Feature-to-Table Relationship
Map Viewer supports editing records stored in a Feature-to-Table relationship.* What is a Feature-to-Table relationship? We can break it down into 3 components: a layer, a table, and a relationship.
- Feature Layer: Administrative Units
Let’s say you are a GIS technician working for the California Department of Forestry and Fire Protection (CAL FIRE). To better track incident response facilities across the state, you have created a polygon layer that divides the region into smaller administrative boundaries.
- Table: Facilities Statistics
Next, you have a table that contains summary statistics about each one of those administrative wildfire units, ie. the number of wildfire incidents located within that unit.
- Relationship
Lastly, you create a relationship between the Administrative Units feature layer and the Facilities Statistics table, based on a unique field contained in both datasets. In this case, the Unit Code, which contains a unique ID for each unit.
There you have it; the table is related to the layer, giving us a dataset with a Feature-to-Table relationship.
*Note: As of October 2023, Feature-to-Feature relationships are additionally supported in ArcGIS Online. To learn more, check out this blog on Feature-to-Feature editing in Map Viewer.
Leveraging the new related record form element – in combination with authoring forms for related tables – allows you to streamline related record editing workflows using Map Viewer. As seen above, you can view, add, update, and delete existing related records on an ArcGIS hosted feature service with a Feature-to-Table relationship. Follow along with the example below to learn how you can get started.
Configuring related records in Map Viewer
Now that you have a good understanding of related records, let’s practice setting it up in Map Viewer. Using our earlier example, this map displays recent wildfire facilities and units across California. To quickly summarize information on the 1,300+ wildfire facilities in the state, a one-to-one relationship between Administrative units and Facilities statistics has been established.
Before you can edit any records in your dataset, you must manually add the related element into the form. Open the California Wildfires Related Records map and follow along with the steps below:
- Select the Administrative units layer from the layers panel
- Click the Forms button on the Settings (light) toolbar
- In the Form you should see a new Related records element on the right
- Select CAL_FIRE_Admin_Units_Facilities_Statistics and drag it to your preferred location onto the form
- Configure properties such as the Display name, Description, Sort by, and Sort order fields*
- Click ‘Add all’ to add all the fields to the form
- When you’re happy with the form, click OK to save and exit
*Note: To learn more about configuring Smart Forms in Map Viewer, take a look a previous article: Smart Forms aren’t just for ArcGIS Field Maps anymore
In addition to authoring forms for the parent feature layer, you can also configure them for related tables. This allows you to customize the editing experience as you would for any other editable layer by leveraging tools such as expressions, grouping, and descriptions. To author a form for a related table, ensure that the table is selected then click the Forms button.
Editing related records
Once your forms are configured, you can begin editing in Map Viewer. Still using the California Wildfires Related Records map, follow the steps below to edit related records:
- Click the Edit button
- Click on the map to select an Administrative unit
- In the form that opens, you will see a Facilities Statistics record, click to open
- The related record form opens
- Use the up or down arrows to change the Frequency
- Click Update; this brings you back to the form
- Click the Back arrow to exit without making changes to the feature
Congratulations, you’ve just edited a related record in Map Viewer! The related record form should appear the way you configured it in the previous step. Once you select the related records element, you have the option to either update or delete the record, similar to editing any other feature.
Summary
Editing related records has come to life in Map Viewer. You can optimize editing workflows in Map Viewer in a matter of minutes by using the new related record Form element in combination with configuring forms for related tables. Stay tuned as we’ll be adding support for editing more types of relationships and services down the road, including support for ArcGIS Enterprise services.
Article Discussion: