Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Search Scopes - Part 2

Table of contents
  1. Scenario
    1. PrimaryAction
  2. Configuration
  3. Parameters
    1. Search Scopes

Scenario

Search Scopes are not only required in order to perform searches but also to define link targets for your specified Action Cards (configured in the “allResources”-section).

Let´s assume we have added a new Action Card for “Equipment” to the All Resources View:

image.png

The configuration for the equipment card looks as followed:

image.png

PrimaryAction

The “primaryAction” specifies a search scope to be routed to when clicking on the “primaryIcon”. As a user we expect to see a list of available Equipment-Objects to be displayed after clicking on the printer icon but effectively get the following:

image.png

The No configuration was found message appears because no available search scope named EquipmentScope was found in the configuration file. So let´s define this missing configuration by adding the following key/values to the search scopes:

image.png

Now, doing a Page-Refresh will show the expected overview/list of Office Equipment:

image.png

Configuration

“searchScopes” can be modified, added, removed and enabled or disabled in the custom configuration file: C:\inetpub\Oxford Computer Group\IDABUS UI\portal\app\customisation\assets\config\customConfig.dev.json

Parameters

Search Scopes

Key Description Values
name This is the mapping name to the target defined as “primaryAction”.

In this example: EquipmentScope
string
type Specifies the Object Type as defined in the MIM Portal.

In this example: Equipment
string
text A localizable string that is shown to the user to identify this scope.

In this example we use a single language system where no localization is required, so the instant string is defined as: Office Equipment
localizable string
enabled Specifies if this scope should be displayed in the “Search all resources”-results.

In this example we only want to use the search scope as link target and do not want it to appear in the “Search all resources”-box, so we set it to:
false
true/false
typeQuery This is the most critical parameter as it defines the query for the list of Office Equipment to be loaded/displayed when the “primaryAction” is triggered.

In this example: We want all the office equipment to be displayed without any pre-filters, so it is defined as: /Equipment
XPath
attributes This array defines the attribute names of the target Object (Equipment) displayed in the list.

In this example we only chose one attribute: ["DisplayName"]
(More will be set in Part III)
string[]