Hi,
I am facing an error while adding a multiple facets in annotation.cds file for a project. For single facets its working for multiple its not. The code which I have used is below plus adding an image of error.
Facets: [ { $Type: 'UI.CollectionFacet', Label: 'Info', Facets: [ {$Type: 'UI.ReferenceFacet', Target: '@UI.FieldGroup#Main', Label: 'Main Facet'} ] }, { $Type: 'UI.CollectionFacet', Label: 'Info 2', Facets: [ {$Type: 'UI.ReferenceFacet', Target: '@UI.FieldGroup2#Main', Label: 'Main Facet'} ] } ], FieldGroup#Main: { Data: [ { Value: OrderNo }, { Value: OrderDesc } ] }, FieldGroup2#Main: { Data: [ { Value: OrderNo }, { Value: OrderDesc } ] },

Request clarification before answering.
I would suggest to define a unique ID for each collection facet.
Facets : [
{
$Type : 'UI.CollectionFacet',
ID : 'test',
Label : 'Info',
Facets : [{
$Type : 'UI.ReferenceFacet',
Target : '@UI.FieldGroup#Main',
Label : 'Main Facet',
},
],
},
{
$Type : 'UI.CollectionFacet',
ID : 'test2',
Label : 'Info 2',
Facets : [{
$Type : 'UI.ReferenceFacet',
Target : '@UI.FieldGroup#Main2',
Label : 'Main Facet 2',
}, ],
},
],
BTW: you can also use just reference facets if you do not need extra grouping
Facets : [
{
$Type : 'UI.ReferenceFacet',
Target : '@UI.FieldGroup#Main',
Label : 'Main Facet',
},
{
$Type : 'UI.ReferenceFacet',
Target : '@UI.FieldGroup#Main2',
Label : 'Main Facet 2',
}
],
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.