Skip to Content
0

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

Jan 18, 2017 at 03:41 AM

229

avatar image
Former Member

Hi,

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

avatar image
Former Member Jan 23, 2017 at 04:00 PM
0

To set a field as mandatory use this annotation:

@ObjectModel.mandatory: true

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

Hi,

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?

0
Former Member

@Consumption.filter:{ mandatory:true } This should work

0