Select widget

The Select widget allows you to select features using attribute selection, interactive map selection, and spatial selection. You can enable various actions that allow you to perform data processing tasks with a selection. The widget displays selections made with other widgets, such as Table and List widgets, meaning you can select a feature in another widget and run data actions on that selection with the Select widget.

Examples

Use this widget to support app design requirements such as the following:

  • You want to select features based on their attributes, based on their spatial relationships with other features, or by interacting with the map.
  • You want to be able to run data actions, such as zooming the map or generating statistics about selected features.
  • You want to work with selections made by other widgets.

Usage notes

This widget requires connection to either a data source or a Map widget, depending on which kind of source you configure in the widget's settings.

There are three ways to select features:

  • Interactive selection—Interactive selection involves drawing a point, line, or shape on the map to select a set of features.
  • Attribute selection—Attribute selection involves using SQL expressions to select features matching some selection criteria.
  • Spatial selection—Spatial selection involves selecting features based on their locations relative to features in another layer.

In the widget's settings, you can make one, two, or all three of the selection methods available to users at run time.

With interactive selection, users can select multiple features in the following four ways:

  • New selection (click and drag the pointer to draw a shape)

  • Add to the current selection (press Shift while drawing)

  • Remove from the current selection (press Ctrl while drawing for Windows; press Cmd while drawing for Mac)

  • Select subset from the current selection (press Ctrl+Shift while drawing for Windows; press Cmd+Shift while drawing for Mac)

Settings

The Select widget includes the following settings:

  • Source—You must connect the widget to at least one Experience Builder layer so that the user has something to select. The widget has two modes that differ in how you add selectable layers: Select by attributes and Interact with a Map widget.

    • Select by attributes—With this mode, you add individual layers as selectable layers. You can also make spatial selection available to the user at run time.

      • Selectable layers—Add selectable layers. Click + New data, then click Select data to open the Select data panel. Here, you can choose from layers that you have already added to your app, or you can add new data. Layers you add are listed under Selectable layers. Click a layer to open the Configure layer attribute panel. Here, you can build SQL expressions with the SQL Expression Builder.

      • Allow selection of data generated at run time—Turn on this setting to allow users to select features from layers added at run time with widgets such as the Add Data widget.

    • Interact with a Map widget—With this mode, you connect the Select widget to a Map widget. Interactive selection is the default selection method. You can also make attribute selection and spatial selection available to the user at run time. Click the settings button next to each web map or web scene to open the Customize layers panel.

      • Customize layers—All visible layers in the connected map or scene are automatically synced to the Select widget. If you turn on this setting, those layers appear in a list and you can choose which layers to make selectable. You can also turn on the following settings for each map:

        • Allow selection of data generated at run time—Turn on this setting to allow users to select features from layers added at run time with widgets such as the Add Data widget.
        • Attribute selection—Enable attribute selection for the layers. When you turn on this setting, you can expand each web map or web scene and click individual layers to open the Configure layer attribute panel, where you can build SQL expressions with the SQL Expression Builder.
  • Interactive selection—These settings appear when you choose Interact with a Map widget:

    • Tools—Choose which interactive map selection tools to include in the widget. You must turn on at least one tool.

      • Select by rectangle—Users can click and drag to draw a rectangle across features.
      • Select by lasso—Users can click the map to create the vertices of a polygon, or draw with the pointer to create a freehand shape. Users can double-click to close the polygon and select contained features.
      • Select by circle—Users can click and drag to draw a circle across a feature.
      • Select by line—Users can click the map to create the vertices of a line. Users can double-click to end the line and select intersecting features.
      • Select by point—Users can click the map to place a point and select intersecting features.
    • Interactive selection mode—Choose Partially within to have the widget select features that are at least partially contained by drawn features. For example, you might want to select all roads that pass through a town. Choose Wholly within to have the widget only select features that are entirely contained by drawn features. For example, you might want to select all parcels that are within the boundaries of a historic district.

  • Spatial selection—Turn on Select by data to create spatial relationships that users can use to select features. These settings are available with either source mode.

    • Add selecting data—You use selecting layers to select features from selectable layers. For example, if you want to select cities within a certain selected state, the cities layer is the selectable layer and the states layer is the selecting layer.

    • Relationship—Specify a spatial relationship rule. There are eight possible relationships.

      • Intersect—Part of a feature from the selectable layer is contained in a feature from the selecting layer.
      • Contain—The feature from the selectable layer is completely enclosed by the feature from the selecting layer.
      • Cross—The feature from the selectable layer crosses a feature from the selecting layer.
      • Envelope Intersect—The envelope of the selectable layer intersects with the envelope of the selecting layer.
      • Index Intersect—The envelope of the selectable layer intersects the index entry of the selecting layer.
      • Overlap—Features from the selectable layer overlap features from the selecting layer.
      • Touch—The feature from the selectable layer touches the border of a feature from the selecting layer.
      • Within—The feature from the selecting layer is completely enclosed by the feature from the selectable layer.
    • Enable buffer—Add a buffer to the spatial relationship. This extends the range of the spatial relationship by an amount of your or the user's choosing. You can set a Default Distance and choose a Default Unit, both of which users can change at run time.

Interaction options

This widget supports actions, which you can configure on the Action tab of the widget's settings.

Configure message actions to create automatic interactions between widgets. For example, to make a Map widget automatically zoom to features when the user makes a selection, you can add the Record selection changes trigger, select a Map widget as the target, and add the Zoom to action.

Turn on data actions to add buttons to the widget's user interface for performing data processing tasks, such as exporting, zooming to, and calculating statistics for selected features. If you turn on Enable data action, two kinds of Actions buttons are added to the widget. You can click these buttons to open drop-down menus that list all of the data actions you turn on in the widget's settings.

  • Click the Actions buttons that appear next to each layer to run data actions for individual layers.
  • Click the Actions button that appears at the top of the selectable layers list to run data actions for all checked layers with features currently selected.

The following table lists the data actions that the Select widget supports for single-layer and multilayer actions:

TargetData actionSupported for single layersSupported for multiple layers
Directions widgetDirections fromYes
Directions widgetDirections toYes
Elevation Profile widgetView elevation profileYes
FrameworkExportYesYes
FrameworkStatisticsYes
Map widgetPan toYesYes
Map widgetShow on mapYes
Map widgetZoom toYesYes
Near Me widgetSet locationYes
Table widgetView in tableYes

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.