Skip to Content

Fiori Elements - CDS view Annotations - create switch, set properties

Jan 18, 2017 at 03:41 AM


avatar image


I have create a fiori app using CDS views, annotations and Fiori elements. I'm now trying to refine the view, by doing things like:

1. Adding a field as a switch/check box

2. setting the properties of a field to mandatory.

I would like to do this using annotations (as entered in the CDS consumption view using the ADT) but I can't find any way to do these sorts of things with syntax examples.

Is this possible?

Any help would be much appreciated

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

1 Answer

Rafael Petersen Gehring
Jan 23, 2017 at 04:00 PM

To set a field as mandatory use this annotation:

@ObjectModel.mandatory: true

Show 1 Share
10 |10000 characters needed characters left characters exceeded


I have the same requirement. using this annotation puts the little red * next to the field but it doesn't actually make it mandatory... is there more to it than this?