cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

To set a field as mandatory use this annotation:

@ObjectModel.mandatory: true

smith_john
Active Participant
0 Kudos

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?

Angshuman
Participant
0 Kudos

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