cancel
Showing results for 
Search instead for 
Did you mean: 

CDS presentationVariant - maxItems

former_member435529
Participant
0 Kudos

Hi,

I added this to the RAP metadata extension and maxItems is not working regardless of the value. SortOrder works ok though.

Why's that?

Thanks,

Javier

presentationVariant: [{

sortOrder: [{ by: 'TorId', direction: #ASC }],

maxItems: 5,

visualizations : [{ type: #AS_LINEITEM }]

}] }

Lee3
Active Participant
0 Kudos

Hi Javier,

did you manage to find a solution? I'm encountering the exact same problem.

Kr

Lee

Accepted Solutions (0)

Answers (1)

Answers (1)

snap_vita
Explorer
0 Kudos

Hi,

try to encapsulate your presenationVariant additionally in a selectionPresentationVariant, like this:

presentationVariant: [{

qualifier: 'pVariant'

sortOrder: [{ by: 'TorId', direction: #ASC }],

maxItems: 5,

visualizations : [{ type: #AS_LINEITEM }]

}]

selectionPresentationVariant: [{

presentationVariantQualifier: 'pVariant'

}]

Additionally, if you defined the presentationVariant in a Child Entity, you need to use the type #SELECTIONPRESENTATIONVARIANT_REFERENCE (and not #LINEITEM_REFERENCE) in the parent facet

 

@UI.facet:

[{

...

id: 'Child',

type: #SELECTIONPRESENTATIONVARIANT_REFERENCE,

// type: #LINEITEM_REFERENCE,

position: 20,

targetElement: '_Child'

}]


Regards