Streamlining Interaction in ArcGIS Experience Builder: Triggers and Actions
ArcGIS Experience Builder provides users with message and data action configurations to help build more interactive and diverse web applications. The blog will review some commonly used action examples to understand how this functionality can enhance your web application.
Did you know you can build connections between widgets by configuring widget actions and adding a trigger? ArcGIS Experience Builder empowers users to customize web applications seamlessly by adding widgets, the fundamental building blocks that enhance functionality without extensive coding. These widgets function independently, but through configuring widget actions and triggers, users can establish connections between them.
Enhancing widget interactions within the web application significantly boosts adaptability and interactivity, allowing users to gain deeper insights into geospatial data. For example, implementing a 'Zoom to' functionality in a data-centric widget enables users to trigger a zoom action on the map, providing flexibility in defining the location and trigger integration.
Join me in this blog as I guide you through common action configurations, offering a comprehensive understanding of how actions work within Experience Builder.
Message action vs. Data action
*Please note that not every widget includes an action configuration.
When you open a widget that allows action configuration, you can add two types of actions from the 'Action' section: Message actions and Data actions. What are the differences?
Message actions are designed for communication and interaction between widgets within an application. They require a trigger action as well as a target widget to respond. Different widgets have different trigger actions available.
In comparison, data actions are focused on performing operations on the data itself, such as filtering, querying, or updating the map.
A message action has two primary components: a trigger and a target.
A trigger is an action the user sets to automate another response or operation.
The automated response or operation is called Target.
For example, a user configured a message action so that every time they select a record from a table, the map zooms in to the selected record. In this case, the trigger is the selection from the table and the target is the map zoom-in.
A data action is more straightforward, allowing you to easily toggle on and toggle off to add or remove this data function from each widget.
After knowing the details and differences in Action, let’s go through some commonly used action examples in ArcGIS Experience Builder!
Select Table Data and Zoom to Matching Map Area
One of the most commonly used message actions is selecting records from the table widget and having the map automatically zoom to the record. This action makes the web application more user-friendly and facilitates a better understanding of geospatial data.
- To configure this action, users need to add two widgets: Table widget and Map widget. Next, add a trigger on the table widget.
- Select a trigger: Record selection changes
- Select a target: Map widget
- Select an action: Zoom to
Trigger data: Select the table data that you wish to trigger the action.
- *Please note that this table data doesn’t have to be from the original attribute table of the map; it can be a separate table as long as it shares a common attribute with the map data.
- If you wish to add a separate table, you will need to create a new sheet in the table content first. The trigger action can only select data from the table content.
In the example below, the table widget used the original map table as the trigger data. Every time users select a record from the table, the map will zoom into the selected record.
Visualize and Filter the Map with Data-centric Charts
Another commonly used action configuration method is filtering the map from data-centric widgets, such as Chart. This action configuration is often employed by data scientists to visualize data distribution after filtering.
- To configure this action, users need to have a Chart widget and a Map widget first. Next, add a message action in the Chart widget.
- Select a trigger: Record selection changes
- Select a target: Map widget
- Select an action: Filter
- Action data: Choose the data that you want to apply filters
- Trigger field: Choose the field used to categorize the chart. In the example, the trigger field is the neighbourhood
- Action field: The same field as the trigger field.
In the example below, the three charts represent the distribution of dog parks, schools and community gardens in each neighbourhood in Vancouver. When users click on each neighbourhood in the chart, the map will filter out all records that are not in this neighbourhood. By clicking these charts, users can visualize different combinations of the three features based on their choice.
Synchronizing Different Map Views
In ArcGIS Experience Builder, users can create different views of maps. By adding a trigger section on the Map widget, multiple maps can be synchronized when one map’s extent changes.
- To configure this action, users need to have two maps initially. They can use the Section Widget to create different views of the map, or they can add two map widgets directly on the same page. Next, click a message action in either of these two maps.
- Select a trigger: Extent changes
- Select a target: Map widget
- Select an action: Pan to
- Once this action is configured, let’s click “+Add action” to add another action
- Select a target: Map widget
- Select an action: Zoom to
By adding both Pan to and Zoom to actions to the map widgets, synchronization is more complete and can be triggered by both actions.
However, if users want both maps to be triggered interchangeably, message actions should be added to both map widgets. Otherwise, synchronization can only be implemented when changing one of the map’s extents.
In the example below, two views of the map can be triggered interchangeably when the map’s extent changes. This action is often used when users want to compare two sets of data.
Data action on Query Widget
A data action is a straightforward configuration where changes are reflected immediately on the widget itself.
To enable Data action, users can click “Data action” under the Action tab and toggle on the blue button.
The actions have now been added to the widget; let's check it out! After configuring the content in the query widget, users can apply the query, and they will be able to see the data actions in the top right corner of the widget on the result page. Data actions can be applied to either loaded records after the query or all records from the data. The available actions are those that users selected on the Data action pane.
In the example below, users have options to zoom to, pan to, show on the map, or export data. These functions overlap with message actions, as message actions can also pan to or zoom to data on the map. However, data actions provide more flexibility to users, as they can choose which record they want to zoom to or pan to. If they configure message actions, every record they select will have to be zoomed to or panned to.
Most widgets have similar data actions as the Query widget; once you enable data actions, you will be able to see them directly from the widget itself.
Closing Thoughts
After reading this article, users should have a basic understanding of actions in ArcGIS Experience Builder. This understanding empowers users to create customized interactions. The four highlighted actions can be easily adapted across various widgets, offering a concise introduction to inspire users to explore the vast possibilities within ArcGIS Experience Builder.