Skip to content

Search Help

VinceZK edited this page Jul 19, 2020 · 2 revisions

Search Help facilitates the user to input values by selecting from a list. It shows a dialog window, in which the user can give search criteria to filter the values he wants to input.

Since entities are interwoven together through relationships, and attributes have Data Domains, there are lots of chances that one needs to cross view multiple entities and attributes at the same time. Search Help thus is very useful and provides great convenience during the data inputting.

Create Search Help

In the modeling tool, go to the 'Search Help' tab. In the left list, it shows the 10 latest changed search helps in the system. You can run a fuzzy search which filters in the names and descriptions. Click the '+' button on the top right, you can create a new search help.

You must give a unique name to your search help. Optionally, you may also give some description. You have to assign an entity type and one of its relation as the main relation. All the attributes of the relation are then listed in the Search Help Fields section.

2 additional settings are provided. "Behaviour" controls whether the search result is initially listed when the dialog popup, or need the user manually click the search button. "Multiple" controls whether the returned is a single value or multiple values.

Search Help Fields

Here you can set the which fields are used for filter, and which fields are shown in the result list. The field list is initially derived from the main relation. You can then adjust attributes by deleting unwanted, or adding fields from other relations of the entity type. The settings on each field are described below.

Once "Import" is checked, the value of the attribute will be carried into the corresponding filer. Once "Export" is checked, the value of the attribute will be exported to the underlying input fields. You must set at lease on field as the "Export".

Alias can be given if you want to rename the field. For example, you can rename "USER_ID" to "CREATE_BY".

You can give the list position(L.P) and filter position(F.P) for each field. If 0 is given, then the field will not be shown in the corresponding area. Specially, in the filter area, you can set the field as display only(Disp) and give a default value. For example, COMPANY_ID is set as display only and with default value "DARKHOUSE", then in the search help dialog, COMPANY_ID is in gray with the default value 'DARKHOUSE'.

Search Help Dialog

Change Search Help

Search helps can be freely changed without data inconsistency concerns. However, it may cause the search help invalid in the UI. For example, if you delete an export field, then the data elements who use the export field are not valid for its search help.

Consume Search Help

Usually, you can consume the search help by assigning it to a data element. And all the attributes which are assigned with the data element can use the search help. Of course, jor-angular has to be used for the UI development, otherwise, you have to develop your own solution to consume the search help meta.

Besides, you can also directly invoke the search help like below:

import {SearchHelpComponent} from 'jor-angular';

@ViewChild(SearchHelpComponent, { static: true })
private searchHelpComponent: SearchHelpComponent;

this.searchHelpComponent.openSearchHelpBySearchHelp('ROLE', 'NAME',
  'NAME', exportObject, this.readonly, afterExportFn);
Clone this wiki locally