Label helper configuration

On some occasions in the system, a configurator has the possibility to configure the data source of any kind of list. A search object to find entities of a specific type (e.g. User) is the basis for these settings. A separate configuration dialog will appear which allows the extension or restriction of this search accordingly. The label of a search result item can also be defined using a calculation expression.

Background information

Labels of selected items which are contained within a data base page are not always easy to solve. The labels of items must be displayed which have not yet been loaded by paging or searching. To solve this issue, a separate item query must be executed to fetch the necessary information to build those labels. The configurator does not have to worry about this explicitly, as this happens automatically due to the 'Label Helper' technology. Therefore this configuration option has the same name.

In most cases, the dialog for configuring a 'Label Helper' supported service looks like the screenshot below:

images/download/attachments/106963179/image2020-2-26_11-30-55-version-1-modificationdate-1659357672141-api-v2.png
This example shows a data service of a Combobox which offers user entities for selection.

Projection tab (A)

(1) The Label expression defines the label of a search result item. All context matching Berechnungsausdrücke can be used. The properties listed on the right (5) are used as readable and searchable properties.

(2) Activates the usage of 'ends with' search restrictions (e.g. the search text 'dmin' would be added (besides others) to the search restrictions as username ilike "%dmin%"). This enables the possibility to search for word content and not only for exact matches and 'begins with'.

CAUTION◄ 'Ends with' search resctrictions will cause the data base to check every table entry since no indices of the concerning columns can be used anymore. Therefore such queries become slower and slower with the increasing data volume. The option should therefore only be activated if the number of searchable records is limited to a few thousand.

Example with the configuration shown above:

With option (2) deactivated:

images/download/attachments/106963179/image2020-2-26_10-15-55-version-1-modificationdate-1659357672119-api-v2.png

images/download/attachments/106963179/image2020-2-26_10-16-27-version-1-modificationdate-1659357672123-api-v2.png

With option (2) activated:

images/download/attachments/106963179/image2020-2-26_10-17-18-version-1-modificationdate-1659357672127-api-v2.png

images/download/attachments/106963179/image2020-2-26_10-17-44-version-1-modificationdate-1659357672131-api-v2.png


(3) The setting for Max results defines the number of elements returned by the service initially or during scroll operations. A value of 0 is interpreted as 'unrestricted'. A proper setting for this parameter may be crucial for working with the convenience selectors 'all' and 'inverse' (see Multiselect combobox) when defining the filter criteria for a column based on the service configuration. On the other hand, not setting an upper limit for the number of results can result in undesired runtime behaviour if the service delivers large amounts of data.

(4) The Result type specifies in which form the entries of the search should be returned (e.g. entity to load the whole user object or tuple to load only the defined fields (5).

(5) Defines the properties which are used for searching. These properties will also be used if the Result type (4) is set to 'Tuple'.

Join (B)

Offers the possibility to fetch additional data (e.g. attributes or fields of different entities). See also Search builder.

Search restriction (C)

Restricts the result set by using custom conditions. See also Search builder.

Search order (D)

images/download/attachments/106963179/image2020-1-28_13-54-58-version-1-modificationdate-1659357672077-api-v2.png

Defines properties by which the search result is sorted (ASC = Ascending, Not ASC = Descending).