cancel
Showing results for 
Search instead for 
Did you mean: 

How to make value help field allow manual input other than values in value help in sap CAP?

0 Kudos

My requirement is to make the input field get its F4 from its own table and also allow user to enter values other than in the table. I created a view on table using select query in db cds and then exposed it as entity via service cds.
i used that entity as a value list for input field in annotation cds of the fiori element app. But getting the error as

'description path missing' when i try to manually input value into input field.

Kindly provide your suggestions.

Many thanks.

Scenario -

Entity in DB

entity JeConfiguration: cuid{ tableName : String(100) @mandatory @title : 'Table Name'; shareType : String(10) @title :'Share Type';}
view JETableName as select from JeConfiguration { ID, tableName };

Entity definition in Srv

@Capabilities : { InsertRestrictions : {Insertable: true}, UpdateRestrictions : {Updatable : true}, DeleteRestrictions : {Deletable : true} }

@fiori.draft.enabled

@odata.draft.enabled

entity JeConfiguration as projection on my.JeConfiguration;

@cds.redirection.target entity

JETableName as projection on my.JETableName;

UI Annotation:

annotate service.JeConfiguration with @(

UI.FieldGroup #GeneratedGroup1 :{

$Type:'UI.FieldGroupType',

Data:[

{ $Type:'UI.DataField', Label:'Table Name', Value:tableName, }

]});

annotate service.JeConfiguration with @(

UI.TextArrangement : #TextOnly, cds.odata.valuelist,)

{

tableName @(

Common.FieldControl: tableName,

Common :{

ValueList:{

Label:'Table Names',

CollectionPath:'JETableName',

Parameters:[ {

$Type:'Common.ValueListParameterOut',

LocalDataProperty: 'tableName',

ValueListProperty: 'tableName'

} ] } } );

chgeo
Advisor
Advisor

I am afraid the description is way to vague to tell what's going on.

Please stick to the good practice of providing a minimal example that reproduces the issue or question. Create a small Github repo and post the link here.

Accepted Solutions (0)

Answers (0)