Selection Module
The Selection Module implements the Saved Results feature, which allows users to save, open and modify collections of features. After performing a search, query or identify operation, you can save the results with a name that appears in the title of the panel when the saved results are viewed. You can rename or delete saved results.
You can only open one set of saved results at a time. You can add or remove features either through the Panel Actions Menu while viewing feature details, or via a link in a feature's map tip. You can also modify the current results by using the Combine Results option to either: add saved results, subtract saved results, or match intersecting saved results. Saved results that have unsaved changes are marked with an asterisk (*) at the end of the panel title.
Saved Results only persist for the duration of your browser session. If you refresh or close the browser, you will lose all Saved Results.
To save results across sessions and share them with other users, a signed-in user can save a project, provided the viewer supports projects. For information about projects, see Project Module.
In the Result List's Panel Actions Menu , the user can save the results , and open them later . The user can also combine results .
Result List's Panel Actions Menu
There is also a built-in set of Saved Results called Starred Selection. You can add or remove a result from the Starred Selection by clicking the star beside a result in the Results List, Results Table or Map Tip.
You can add or remove a feature from the Starred Selection in: the Results List, the Results Table and a Map Tip.
To view the Starred Selection at any time, click the I Want To menu and click View Selection.
By default, the View Selection option only appears if you have any kind of saved results. If you have only saved results to the Starred Selection, the Starred Selection appears. If you have other named saved results, a list of saved results appears, including the Starred Selection.
Configuration Properties
Module
-
resultsListStatusRegion
: The region to use for the Results List status message. This message informs the user when results have been saved. -
resultsTableStatusRegion
: The region to use for the Results Table status message. This message informs the user when results have been saved. -
menus
: An array of menus. By default, this includes a single menu:CombineResultsActions
. Each menu has the following properties:-
id
: The menu's ID. -
description
: A short description of the menu.If your viewer is going to be available in more than one language, enter the text key that the description is assigned to. See Configure User Interface Text for more information on using text keys.
-
moduleId
: The ID of the module that the menu belongs to. -
defaultIconUri
: The URI of the default icon for menu items. -
items
: An array of menu items. Menu items have the following properties:-
iconUri
: The image to display beside the menu item. The recommended image size is 24px by 24px. -
text
: The text to appear on the menu item. You can use a text key or the literal text. -
description
: A brief description of the menu item to appear below thetext
. You can use a text key or the literal text. -
command
: The command to execute when the menu item is selected.If you set the
command
property, do not set thebatch
property. -
commandParameter
: The parameter value to pass to the command when it runs, if it has a parameter. Parameters may either be simple strings or complex objects containing any number of parameters.If you set the
commandParameter
property, do not set thebatch
property.In the following example from the CombineResultsActions menu, a commandParameter is passed into the CombineResultsInteractive command to start the interactive process to combine results:
"command": "
CombineResultsInteractive
", "commandParameter
": { "mode": "union
", "currentResults": "{{context}}
"}The
{{context}}
token is a special token that retrieves the default menu context which a menu may have. For example, the default context of theCombineResultsActions
menu is theFeatureSetCollection
that represents the current results. Therefore, the command begins the interactive process of adding saved results to the current results. -
hideOnDisable
: If this property is set totrue
and the menu item's command cannot run, the menu item does not show in the menu.If
hideOnDisable
isfalse
and the menu item's command cannot run, the menu item shows in the menu, but it is grayed out. -
batch
: An array of objects, each with three properties: an executable command, an optional command parameter, and an optional Boolean to abort the execution of further commands if a command fails to execute. This allows multiple commands to be executed in a specified order, although some commands may trigger asynchronous actions.The following example attempts to activate the tabbed toolbar and, if successful, proceeds to greet the user with an alert:
"batch": [ { "command": "ActivateView", "commandParameter": "TabbedToolbarView", "abortBatchOnFailure": true }, { "command": "Alert", "commandParameter": "Hello!" } ]
If omitted,
abortBatchOnFailure
isfalse
by default.If you set the
batch
property, do not set thecommand
orcommandParameter
properties.
-
-
Views
-
SaveSelectionView
: Noconfiguration
properties. -
ListSelectionsView
: Noconfiguration
properties. -
CombineResultsView
: Noconfiguration
properties.
View Models
-
SaveSelectionViewModel
: Noconfiguration
properties. -
ListSelectionsViewModel
:-
isPaged
: To paginate the Saved Results panel, set totrue
. The default istrue
. -
pageSize
: The number of items per page. The default is10
.
-
-
CombineResultsViewModel
:-
isPaged
: To paginate the Combine Results panel, set totrue
. The default istrue
. -
pageSize
: The number of items per page. The default is10
.
-
See Also...