We have a common valuelist entity that has an attribute called lookuptype. Various application entities use this valuelist entity to provide valuehelp by filtering out the valuelist entity on the lookuptype. This entity definition is as follows
entity value_Lookups : cuid , managed , temporary {
lookuptype : String(100) not null;
lookupcode: String(20) not null;
lookupvalue: String(50) not null;
lookupdescription: String(200) not null;
}
We want to use the selectionvariant annotation on this entity and define selection variants for every lookuptype and then use those in the valuelist annotation on the target entities.
annotate Lookups with
@UI.SelectionVariant:
[
{ ID: 'ORD_STATUS', Qualifier: 'Order Status', Text: 'Order Status' , FilterExpression: 'lookuptype EQ "ORDER_STATUS"' },
{ ID: 'LINE_STATUS', Qualifier: 'Line Status', Text: 'Line Status' , FilterExpression: 'lookuptype EQ "LINE_STATUS"' }
];
annotate Orders with {
Orderstatus @(
(Common : { ValueList : {
CollectionPath:'Lookups',
SelectVariantQualifier:'ORDER_STATUS'
}
annotate OrderLineswith {
LineStatus @(
(Common : { ValueList : {
CollectionPath:'Lookups',
SelectVariantQualifier:'LINE_STATUS'
}
We wanted to know the correct syntax for the SelectionVariant. The above did not work