Results Module

The Results Module provides views that display feature data. The views honor the configuration defined in a site for layers and fields (visibility, aliases, and so on).

The Results Module can display results in two modes: a List view and a Table view. The List view (also referred to as the Results List), displays results in a list in the side panel. The Table view (also referred to as the Results Table), displays results in a table in the bottom panel. The user can switch between the views via the Panel Actions menu at the top-right of the panel. By default, results are displayed in the List view. The List view can be activated via the ShowResultsList command, while the Table view can be activated via the ShowResultsTable command.

In Manager, you can configure which results view the user sees by default. For information see Look and Feel.

The Handheld interface does not support the Table view.

 

Results List View

When a user completes an identify action, the view summarizes the results for each identified layer in the Results List in the side panel.

Summarized list of identified results

When the user clicks one of the summarized items in the list, the specific items are listed and the panel heading indicates the layer name and the number of items. Each item comprising the summary is listed.

For example, clicking (2) Hospitals in the summary list shown in the above image opens a list identifying the 2 hospitals. The hospitals are highlighted in yellow on the map, and when the user places the cursor on one of the entries, the corresponding hospital icon is graphically emphasized in blue on the map.

Item highlighted in the list and the icon emphasized on the map

When the user clicks one of the hospital names, its details are displayed, and the corresponding icon for the hospital is emphasized and centered on the map.

Item details shown and the icon is emphasized and centered on the map

When the user clicks an identified layer in the summary list that has more than 50 items, the specific items are listed in groups of 50 (the default), and a paging area opens at the bottom of the list panel. The total number of items is also shown. The user can page forward and backward, and go to the last page or return to the first page of the items list. As the user pages through the list, the paging area shows which group of 50 is being displayed, for example 1 - 50, 51 - 100, 101 - 150, and so on.

Note that the default of 50 items per page can be changed by updating pageSize in the FeatureSetResultsView (see Views in the Configuration Properties below).

Land Use in the summary list indicating 105 items found

Specific Land Use items and the paging area below the list

Results Table View

When the user selects Switch to Table in the Panel Actions menu, the view displays the results in a table with the feature sets organized on separate tabs, as illustrated below. Clicking a tab shows the data for that set of features. For example, with Land Use features included in the results, the Land Use tab shows the features in rows, with the attributes of each feature organized in labeled columns. All of the land use items are highlighted in yellow on the map. When the user hovers their cursor over a row, that feature is highlighted in blue on the map. When the user clicks one of the rows, the map zooms to the corresponding item. This behavior is defined in ResultsTableFeatureClickedBehavior in the configuration file. After clicking a row, the user can continue to hover the pointer over other rows to highlight the corresponding features on the map. When the user clicks , Results Table filtering is enabled and the user can find results by applying filters. The user can directly edit the Results Table.

Example of the Results Table

The major elements of the Results Table are described below.

Click a tab to view its features in the table.
Click to toggle filtering.
Click the Feature Actions menu to select actions that apply to the specific feature.
Drag left or right to reorder the column.
Click the Feature Set Actions menu on a selected tab to choose an action that is applicable to the feature set.
Click the Panel Actions menu to select actions that apply to all of the feature sets in the Results Table.
Use the Maximize and Restore toggle to change the panel size.
Drag a column separator in the header row of the table left or right to resize a column.

Filters can be applied to the Results Table to find results of interest.

Filtering, sorting and column removal and reordering are respected when you export results to CSV, XLSX or Shapefile.

To filter results:

  1. Near the top-left of the Results Table panel, click .

    A row of filters appears beneath the column headings.

  2. In the column you want to filter, type a search term. For example, beneath the Name heading, type tor.

    Only results whose Name contains tor are displayed. Search terms are case-insensitive.

  3. You can apply more than one filter at a time. For example, beneath the Category heading, type schools.

    Only results whose Name contains tor and whose Category contains schools are displayed.

    To clear a specific filter, click beside the search term. To clear all filters, click to the far-left of all filters.

  4. To disable filtering, click .

    The filters are disabled and the row of filters is hidden.

Instead of editing each feature individually, you can edit feature attributes directly in the Results Table.

To edit the Results Table:

  1. In the Results Table, click the Panel Actions menu of the tab you want to edit.

    The Panel Actions menu appears.

  2. In the menu, click Edit Results.

    You can now edit fields in the Results Table.

  3. Click the field you want to edit.

    The current field is highlighted in blue.

  4. Enter a new value for the field.

    The modified field is highlighted in yellow and appears to the far-left of the row to indicate unsaved changes.

  5. To save your edit, move to another field by clicking it or using a keyboard shortcut.

    While editing the Results Table, the following keyboard shortcuts are available:

    • Tab: Move to the field to the right of the current field.

    • Shift+Tab: Move to the field to the left of the current field.

    • Enter: Move to the field below the current field.

    • Shift+Enter: Move to the field above the current field.

    • Esc: Reset the value of the current field.

    If the Viewer saves the edit successfully, briefly appears to the far-left of the row.

    If the Viewer cannot save the edit, the following occurs:

    • The field is highlighted in red.
    • appears to the far-left of the row.
    • A yellow error message appears above the Results Table.
  6. To finish editing, click Exit Editing near the top-right of the Results Table.

Actions Menus

The content of the actions menus, represented by the menu icons and , is determined by the actions associated with the view that is open. For example, the menus can contain some or all of the following.

The actions menus applicable to the Results List and the Results Table are configured in the Menu Module. The following table maps the menu name in the configuration JSON file to the menu name on Context Menus page in the Management Pack.

Menu name in the configuration JSON file Menu name in Management Pack Context Menus
FeaturesActions1 Feature Actions
FeatureSetCollectionActions Results List Collection Actions
FeatureSetCollectionResultsFeatureSetActions Results List Collection Element Actions
ResultsTableActions Results Table Collection Actions
FeatureSetResultsActions1 Results List and Results Table Set Actions
FeatureSetResultsFeatureActions1 Results List and Results Table Set Element Actions
1 Changes to the FeatureActions menu, the FeatureSetResultsActions menu, and the FeatureSetResultsFeatureActions menu in the configuration file apply to the equivalent actions menus for both the Results List and the Results Table.

 

The Results Module does not need to be aware of which module is the source of the feature set collection that it is going to host, that is, which module generated the feature set collection and how it was requested. The request can originate from an identify, search, query, measurement, or map tip operation. You can configure the way the result of an operation is handled (that is, which commands are executed) by using the resultMappings element.

Export Results with Data Links

If the results that a user wishes to export have data link data, an additional field (called GCX_OID by default) is added to the exported results data.

If the user exports results to CSV, the data link tables are included as an additional CSV file in the Export.zip. The GCX_OID correlates the data link's CSV and the exported results CSV, as it is a matching field in both files.

Similarly, if the user exports results to XLSX, the data link tables are included as additional sheets in the XLSX file included in the Export.zip. The GCX_OID correlates the data link's sheet and the exported results' sheet, as they have matching fields on each sheet.

Export Results as Shapefiles

If the user exports results to a shapefile, an Export.zip is created with five shapefile pieces (.shp, .shx, .dbf, .prj, and .cpg).

When the results include data link data, additional shapefile pieces are created. Because data link data often does not include geographical data, only a subset of shapefile pieces are generated (.dbf, and .cpg).

Configuration Properties

Module

Views

View Models

Example - Add a Command with a Parameter to a Behavior

The following example demonstrates adding a new command with a parameter to the behavior, ResultsListFeatureClickedBehavior.

To add a command with a parameter to a behavior:

  1. Run an XML editor or text editor as an administrator.

  2. Open one of the viewer configuration files, Desktop.json.js, Tablet.json.js, or Handheld.json.js, in the editor.

    By default, the configuration files are here:

    C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\[instance]\REST Elements\Sites\[site]\Viewers\[viewer]\VirtualDirectory\Resources\Config\Default\

  3. In the Results module section, find the behaviors property. Locate the behavior you want to edit, for example, ResultsListFeatureClickedBehavior.

    {
        "moduleName": "Results",
        ...
        "configuration": {
            ...
            "behaviors": [
                {   
                    "name": "ResultsListFeatureClickedBehavior",
                    "event": "ResultsListFeatureClickedEvent",
                    "commands": [
                        "ShowFeatureDetails"
                    ]
                },
                ...
            ]
        },
        ...
    }

    The behavior executes a single command: ShowFeatureDetails.

  4. Refer to Viewer Commands and Events to determine the type of parameter that is associated with this command or the behavior's event. Although ShowFeatureDetails accepts a parameter of either type, geocortex.essentialsHtmlViewer.mapping.infrastructure.Feature or geocortex.essentialsHtmlViewer.mapping.infrastructure.FeatureSetCollection ID (string), ResultsListFeatureClickedEvent has a parameter of type, geocortex.essentialsHtmlViewer.mapping.infrastructure.Feature, so this is the type to use.

  5. Find a command that you want to add to the behavior that has the same parameter type, for example, PanToFeature.

  6. Add the desired command to the list of commands, separated by a comma. For example:

    "commands": [
        "ShowFeatureDetails",
        "PanToFeature"
    ]
  7. Save the file.