cancel
Showing results for 
Search instead for 
Did you mean: 

how to make a text field with drop down with static values

krishnakumar_nagarajan01
Product and Topic Expert
Product and Topic Expert
0 Kudos
129

krishnakumar_nagarajan01_0-1722525601402.png

how to make a Region text field as a drop down with static values as APJ,NAMER, EMEA,MEE.

below is the field type created in cds file. 

entity Interactions_Items {

    key INTHeader : association to Interactions_Header;
    key TEXT_ID : BusinessKey;
        FeatureDescription : LText;
         Region : String(20);
        NETWORKID:LText;
       
};
View Entire Topic
Willem_Pardaens
Product and Topic Expert
Product and Topic Expert

You can do this by annotating Region as a ValueList. This requires a key-value list to be available as an entity with the possible values. So you'd need a database table (entity) with the values.

This key-value list is typically called a codelist and is a reusable aspect in Fiori Elements. When you use the codelist aspect it should automatically turn into a dropdown, or you can do it manually.

See for example:

https://cap.cloud.sap/docs/advanced/fiori#value-helps
https://github.com/SAP-samples/fiori-elements-feature-showcase/blob/main/README.md#value-help