cancel
Showing results for 
Search instead for 
Did you mean: 

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

rakshetha_jn
Associate
Associate
0 Kudos
993

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Marian_Zeis
Active Contributor

Have a look a the Side Effects Examples:
https://ui5.sap.com/#/topic/61cf21d50ed34cbf888713496c618904

You should find a suitable solution there.

rakshetha_jn
Associate
Associate
0 Kudos

Hi Marian Zeis ,

Thanks for the reply ... I did see a few examples here and they do not work unfortunately ...

I must also say that we are using odata V4... does this have some implication....