Incarnations
Objective
- To create and identify objects without visible ID
Information
- Each PLANTA database record contains a unique ID. Since the display of IDs can sometimes be disturbing or obstructive, invisible or automatic IDs can be used.
- Incarnations are data item structures that enable you to hide the technical ID of a data table. For the user, e.g., only a name field is visible.
- The incarnation DIs consist of two sub-DIs: one data item with Function = ID and one data item with Function = CO (text, name)
Create an incarnation manually
- Create a new DI which you want to become an incarnation DI in the Data Dictionary module.
- When creating an incarnation, please make sure that the DF length, the DB length, and the Column type of the incarnation must be identical to those of the CO data item.
- Select the value “4” in the Class field.
- Open the newly created DI in the Data Items module.
- Right-click on the data item record.
- Select Insert Sub-DI from the context menu.
- Enter the number of the ID DIs in the SUBDI field and select the "ID" value in the Function field.
- Insert another sub-DI record and enter the number of the CO data item in the SUBDI field and select the "CO" value in the Function field.
- Save.
Notes
- The incarnation DI and both of its sub DIs must stem from the same data table. If a name DI does not exist in the same table, it can be fetched from another table via exit.
- Incarnations for which the value for the CO data item must be fetched from another table can also be created directly in the Data Dictionary module. For more information on this subject, see the following description.
Create an incarnation automatically
From DB 39.5.7
- Open the Data Dictionary module.
- Right-click on the required data item (ID data item) and select the Define incarnation/fetch exit command.
- The Define Incarnation/Fetch Exit module is opened.
- Fill the data fields as follows:
- When opening the module, the following fields are automatically filled with the data table and the DI from which the context menu command was made.
- Click on the Create incarnation button.
- The CO data item with the corresponding exit and
- the incarnation data item are
- created automatically.
- Save.
Up to DB 39.5.7
Open the Data Dictionary module.
Right-click on the required data item (ID data item) and select the Define incarnation/fetch exit command.
The Define Incarnation/Fetch Exit module is opened.
Fill the data fields as follows:
- from table: Data table from which the name for a CO data item of the incarnation is fetched via exit.
- Data item: Data item from which the name for a CO data item of the incarnation is fetched via exit.
When opening the module, the following fields are automatically filled with the data table and the DI from which the context menu command was made.
Click on the Create incarnation button.
- The CO data item with the corresponding exit and
- the incarnation data item are
- created automatically.
Save.
Drag&Drop and incarnations
Copying.. |
Explanation |
... a non-incarnation field to an incarnation field |
- The copied value is copied into the incarnation ID.
|
... an incarnation field to a non-incarnation field |
- If there is a relation between the sub-DI with Function = ID of the source incarnation and the target field, the content of the sub-DIs is copied with Function = ID.
- If there is no relation, the content of the sub-DIs is copied with Function = KO.
|
... an incarnation field to a non-incarnation field |
- If there is a relation between the sub-DI with Function = ID of the source incarnation and the sub-DI with Function = ID, the content of the sub-DIs is copied with Function = ID.
- If there is no relation, the content of the sub-DIs is copied with Function = KO.
|