Lookup
Purpose
The Lookup ViewTemplate allows users to select a dataset from another Entity and store the selected UID in the current context. It is used for cross-Entity selection scenarios based on Consumer-Provider relationships.
Behavior
The ViewTemplate displays a LookupView configured by the target Context. When a user selects a record, the UID of that record is written into the EntityField configured via consumerField.
The consumerField must belong to a Consumer that is linked to a Provider of the supplying Entity.
Configuration
The following properties are required:
| Property | Description |
|---|---|
consumerField | Defines the EntityField that stores the UID of the selected record. |
consumerPresentationMode | Defines how the LookupView is displayed. |
The following presentation modes are supported:
| Mode | Description |
|---|---|
POPUP | Opens the LookupView in a separate popup window. |
EMBEDDED | Displays the LookupView directly inside the current View. |
The consumerField must be part of a valid Consumer-Provider relationship. Otherwise, the LookupView cannot resolve the selectable records correctly.
Implementation hints
Use POPUP if the selection process should remain separate from the current form. Use EMBEDDED if the selection should be visible directly inside the layout, for example in a detail-oriented View.
Notes
The presentation mode should be chosen based on whether the lookup interaction should be isolated or embedded into the current working context.