Skip to Content
0

Filter on Formatted value and not on Model binding

Apr 07, 2017 at 09:16 AM

30

avatar image
Former Member

We have an sap.m.Table and in one column the value is formatted and shown in UI. SO, lets assume the data coming from Backend is : "EventDateTime":"2017-04-05T12:32:35.276Z".

We also receive the time zone for such a timestamp.

Now, we convert the received data using the time zone and show that data in : 06:32 04/04/2017 format.

Now, we need to apply column filter to table. As you can see there is a difference in the backend value and the value which is shown on the screen ( Data visible is a day behind due to time zone conversion). Now, we would like to apply the filter on formatted value shown in UI rather than the value which is present in UI.

So currently we have a basic filter for date like :

new sap.ui.model.Filter({ path: sPath, operator: "BT", value1: aValue[1], value2: aValue[2] })

Please help.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers