cancel
Showing results for 
Search instead for 
Did you mean: 

Combining the @cds.odata.valuelist convenience annotation with "ValueListWithFixedValues"

carlonnheim
Participant
0 Kudos
585

Hi SAP Cloud Application Programming Model experts

I am looking for a way to combine the convenience option @cds.odata.valuelist (which produces value helps for managed associations)

https://cap.cloud.sap/docs/advanced/fiori#convenience-option-cds-odata-valuelist

With the "@Common.ValueListWithFixedValues" annotation. Expected result is that the managed associations provide a dropdown rather than popup helps.

I was expecting this would work, but it still gives me a popup value help.

 

@cds.odata.valuelist // To enable the convenience value list creation in FE
entity MyAttribute {
    @Common.ValueListWithFixedValues: true // To make it a dropdown
    key Code: String;
    Description: String;    
}
entity MyEntity : cuid {
    MyAttribute: Association to Attribute; // Managed association
}

 

Thanks in advance!

//Carl

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi carlonnheim,

Please check the sample code for CAP available at the bellow address (session: Additional Features in SAP Fiori Elements for OData V4)

https://sapui5.hana.ondemand.com/sdk/#/topic/2a0a630e50c7472b803fb94dab922d18

Apparently you are using the annotation at the wrong place. 😉

Best regards,
Ivan