Skip to Content
0

Dynamic field control in smart table

Sep 11, 2017 at 12:38 PM

60

avatar image
Former Member

Hi all,

I am quite new to the Fiori, CDS, gateway topics and I have a requirement on the backend side for a Fiori app.

We need to implement a Smart Table and use dynamic field control. In the CDS view I used the annotation @ObjectModel.readOnly:'EXTERNAL_CALCULATION' in order to achieve this. Now in the service, at entity level, for each field a new one was generated (eg. field 'matnr' => field 'matnr_fc' which should contain values for the field control options like read-only - 1, editable - 3, hidden - 7, etc.). The UI developer will use these values in order to adjust the field proprieties in the smart table. The problem is that all the '_fc' fields will be displayed in the table. As they are generated fields I cannot hide them explicitly in the CDS.

How can I achieve this either in CDS or in Gateway ?

From a front end perspective, the service metada should include annotations like:

<Annotations Target="TEST_SRV.EntityType/Field1"><Annotation Term="Common.FieldControl" EnumMember="Common.FieldControlType/Hidden"/><Annotation Term="UI.Hidden"/></Annotations>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers