cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Simultaneous update when editing table in Fiori Elements

08-07-2021 9:05 PM
gregorw SAP Mentor
987 views 1 comments Go to solution
SAP Managed Tags
Subscribe

Hi experts!

In my project I am displaying a table with columns for the start time, end time and duration of an event. I would like to connect these so that if the user enters a start time and an end time, the duration is automatically calculated and entered for them while still in edit mode. Illustrations below:

The backend consists of a SAP CAP odata v4 service, and as such I was thinking maybe I could intercept the PATCH request sent when the user finishes entering the EndTime (srv.before('PATCH',...) {...}) and modify the provided data. This works and changes the model. But it does not refresh the Objectpage when completed, and thus any changes only appear after the page has been reloaded. Any help as to how to achieve this in Fiori Elements would be much appreciated!

Best regards,

Jibbril

View Entire Topic
gregorw
SAP Mentor
SAP Mentor

Hi Jibbril,

maybe the Annotation SideEffects can help you. I have an example in srv/admin-service.cds#L100.

CU
Gregor

0 Likes

Hello Gregor,

This worked brilliantly, thanks for the help!

Best Regards,

Jibbril