...
type: reference
If you index multiple Entity entities, you may want to display the relationship between thesethose. When modelling your data, usually there are 3 types different situations of relation relations that can occur:
Relationship | Supported by Portrait |
---|---|
1:1 - One to One | Fully supported |
n:1 - Many to One | Fully supported |
1:n - One to Many | Not supported |
n:m - Many to Many | Not supported |
Currently, the limitation is that Portrait can only display 1 (or 0) per reference
column.
...
incidents
has a n:1 relation to facilities-at
. A An incident occured occurred in exactly one facility. While , while a facility can have multiple incidents.
We can’t display the relation from facilities to incidents yet. However, we can display the relation from incident to facility:
key: ‘ServiceFacilityNo'
→ so this This is our ‘foreign key column’ inside incidents.Status colour Red title REQUIRED sectionID: facilities-at
→ section Section where the reference should targetStatus colour Red title REQUIRED fieldKey: FAC_NAME
→ label for the reference inside the incident section.Status colour Purple title OPTIONAL
Default would be the configured default ‘name’ column is the ‘name’ column from the entry in facilities-at.
Info |
---|
It is important, that the key is actually the unique key, that is also used by Portait. One way to check this is to go to the detail view of one item and look at the URL in the browser. e.g https://service.demo.portrait.app/encustomer.com/facilities-at/5003/ |
References with ELO
In combination with ELO you have two options for the foreign key a technical key and a Surrogate surrogate key. The technical key ID would be the GUID in ELO. e.g.:
https://service.democustomer.portrait.appcom/en/facilities-de/C5ABFA8D-231A-7366-129F-6F3AD4232389
the Surrogate key The surrogate ID would be a unique string depending our your use case. e.g.:
e.g https://service.demo.portrait.app/en/facilities-at/5003/
Surrogate
...
ID
Go to the source and set key String
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
- id: facilities-at ... key: 'FAC_ID' |
...
Details, see: ELO sources
Technical ID
To use the ELO GUID as a technical ID, it is required that incidents
must have stored also store the GUID of the referenced facilities-at
as attributea foreign key. To achieve this in ELO you have to use the datatype ‘Relation’ ‘Relation’ in the indexed ELO mask object. This way ELO stores not the value of the referenced object. But instead the GUID of the referenced object. For Portrait there are no additional steps as the GUID will be automatically used as the ID if not change explicitlyforces ELO to store a reference (GUID) in that mask field.
If you use the relation functionality for the ELO mask field, there is no further action needed in Portrait and you can link from on elo-sourced entry to another elo-sourced entry with GUID’s (=technical keys).
Form
Note |
---|
Deprecated, will be removed in 8.X. Please migrate your Application to configuration format. Details see https://portrait.atlassian.net/wiki/x/AQBwPQ |
...