on ‎2025 Jul 01 10:26 AM
This is my current code for the entity Trainee.
entity Trainee {
key employee : Association to one Employee;
currentlyLearning : Association to one lpn.LearningPlanEnrollment;
}And this is the current code for the entity Employee (just so you guys can understand what I'm trying to do)
entity Employee : cuid {
firstName : String(100) @mandatory;
lastName : String(100);
name : String = firstName || ' ' || lastName;
gender : Gender @mandatory;
email : String(255) @mandatory;
dateOfBirth : Date @mandatory;
batch : Integer @mandatory;
}What I'm currently trying to do is to create a value list inside a custom action where it displays all of the information of the employee from the Trainee entity. In other words, I want the value list to not only display the ID, but also the name, gender, email, dateOfBirth, and batch.
But using the annotation, I can't do it, as if the CDS couldn't read it. Instead, I can only reach this far.
...
},
) actions {
enrollTrainees(
@Common.ValueList : {
$Type : 'Common.ValueListType',
CollectionPath : 'Trainees',
Parameters : [
{
$Type : 'Common.ValueListParameterInOut',
LocalDataProperty : trainees,
ValueListProperty : 'employee_ID',
},
],
}
trainees
);
};
...Does anyone have a solution to what I'm trying to do? If using Fiori Elements not possible, is it possible using Fiori Freestyle? Thank you.
Request clarification before answering.
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.