Skip to Content
0
Jan 24, 2023 at 10:22 AM

how can I refresh the list after a new item is created when there are Multiple View/tabs in CAP CDS

292 Views Last edit Jan 24, 2023 at 10:26 AM 3 rev

Dear Community,

I have 2 SelectionVariants(OPEN and CLOSED) as Tabs for my List Report View in my CAP based Fiori Elements App.

I followed the implementation from here:

https://github.com/SAP-samples/fiori-elements-feature-showcase#selection-presentation-variant

 
  SelectionVariant #OPEN          : {
Text : '{i18n>Open}',
SelectOptions: [{
$Type : 'UI.SelectOptionType',
PropertyName: status_code,
Ranges : [{
$Type : 'UI.SelectionRangeType',
Sign : #I,
Option: #EQ,
Low : 'OPEN',
}, ],
}, ],

an End user can create a new Item from either the Open/Closed view, based on the status set it must be reflected in the right tab.

If I press the create button in Closed tab and create a new Item and I set its status to Open ...It appears under Closed ..only after I refresh i can see it reflected in the open tab.

What side effect option can I use here ?

annotate NAMESPACE.Items @(
    Common.SideEffects #OnItemCreation: {
        SourceProperties : [
            status
        ],
        TargetProperties : [
            Items
        ]
    }
);<b><br></b>


thank you best regards

Rakshetha