Hi Team 
I would like to have a column in an relationship overview that does not belong to the models but another model that is connected via 1 to1 relationship.
That means:
model 1: Partner
model 2: Account
model 3: financialAccount
relationship: Partner 1:n Account
relationship: Account 1:1 financialAccount
Overview: PartnerAccounts_relationship_PartnerAccount_DM_SelectedItems_OM
In that overview i would like to show a column of a field that is inside financialAccount.
Is that possible? Maybe with expressions?
Kind regards,
Timo
Hi @timo-thin-buffer
It is possible, but not in the manner that you are suggesting.
SelectedItems_OM
The SelectedItems_OMs reference the ___generated Document Models which include:
- The target Document Model (in your case Account_DM)
- The Link Document Model if present in the Relationship
As you can see, the data from further linked Document Models is not included and cannot be referenced. Neither directly, nor using an expression.
Option 1 - Composed Document Models
If you use a Composed Document Model you can model an expression cell in the Form Model to show all this data. I added this Expression
kontext(TeamPerson){
kontext(Person){
"* " [FirstName] " " [LastName]
}
kontext(PersonContract){
kontext(Contract){
"1. " [Title] " - " [WeeklyWorkhours]
}
}
}
to TeamWithPersonsAndContract_CFM in the advanced Workspace that comes with the 2024.06-ext6 installer and got the following result:
Option 2 - Use a Tree Model
If you are happy seeing this information in a List view and not on a Form, a Tree model will allow you to load the data from these linked models and present is in a hieracical list.