3 weeks ago
Hello community! I'll tell you what I want to achieve. I have this list of "Areas" in a "Simple Property Collection"
Each area has a list of certain teams associated with it, these teams must be filtered by the ID of the Area entered, because each area has different teams (Equipos).
I have a navigation called "NavTo_Equipos.action"
This is my "Equipo" page, I thought it would automatically filter the teams according to their areas but it didn't.
For each area it shows me the same complete list of equipment. And this is wrong.
I also tried setting up this filter but it didn't work. This way it shows me absolutely nothing.
What am I doing wrong? I am attaching this just in case how the relationship was presented in my CAP service.
entity AREA : cuid, AUDITORIA, ACTIVO {
EMPRESA : Association to one EMPRESA;
DESCRIPCION : String100;
DESCRIPCIONCONCATENADA : String5000;
AREANIVEL : Association to one AREANIVEL;
CODIGOSAP : String;
ACTIVOSAP : Boolean;
EQUIPOS : Association to many EQUIPO on EQUIPOS.AREA = $self;
}
entity EQUIPO : cuid, AUDITORIA, ACTIVO {
DESCRIPCION : String100;
AREA : Association to one AREA;
SECTOR : Association to one SECTOR;
LIDER : Association to one PERSONA;
COORDINADORCORPORATIVO : Association to one PERSONA;
COORDINADORGENERAL : Association to one PERSONA;
}
Thanks for the help
When you select an AREA from the simple property collection, MDK will set the default binding object for the next page to be the selected AREA record. Since your AREA record has a navigation property to EQUIPOS you can just set the target of your list to be based on the readLink and nav property.
{@odata.readLink}/EQUIPOS
This should then just display the EQUIPOS associated to the AREA assuming the Nav Property is properly filtering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.