I have entity defined like below using SELECT query which is used as association in other Entity and provides value help. The model is that for each team member i have to show Captain in object details page of team member.
entity Team_Details : managed {
key id: String(10) ;
key dob: Date ;
firstname: String;
lastname: String;
captain: Association to one TeamCaptain;
isCaptain:Boolean;
}
Requirement came to show description instead of id so I added Text and Text arrangement annotations.
@readonly
entity TeamCaptain
select from Team_Details distinct {
key id,
key dob,
team,
firstName || ' ' || lastName as FullName: String(200)
}
where
isCaptain= true;
Annotation
annotate service.Team_Details with{
captain@(Common : {
Text : captain.FullName,
TextArrangement : #TextFirst,
// ValueListWithFixedValues: true,
ValueList : {
Label : '{i18n>CaptainName}',
CollectionPath : 'TeamCaptain',
Parameters : [
{
$Type : 'Common.ValueListParameterInOut',
ValueListProperty : 'id',
LocalDataProperty : captain_id
},
{
$Type : 'Common.ValueListParameterOut',
ValueListProperty : 'dob',
LocalDataProperty : captain_dob
},
{
$Type: 'Common.ValueListParameterDisplayOnly',
ValueListProperty: 'FullName',
}
]
}
});
};
Value help selction and saving works fine as expected in object page and text is displayed ie FullName of Captain instead of id.
But for existing team members who had id of Captain selected, they continue to show id in object page details and only if i Edit -> select new captain from value hep -> Save, then ONLY text is displayed i.e Fullname.
Please help to display automatically fullname of team member ie text instead of code on page load of object details page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.