Skip to Content
0

Binding sap.ui.table.table with bindRows passing multiple filters

Jan 27 at 07:33 AM

64

avatar image
Former Member

We are passing filters in bindRows below is our code.From backend data is coming properly.But its not getting bing with the table.No errors are getting displayed.

filter2 = new sap.ui.model.Filter("CreatedOn",sap.ui.model.FilterOperator.BT,fdate,tdate);

var filter = new sap.ui.model.Filter("Type" ,sap.ui.model.FilterOperator.EQ,'A');

table.bindRows('/DoaReplacerepSet',null,null,[filter,filter2]);
table.setModel(odata);

We migrated from db2 to hana database.Before this code was working in db2 now we moved to latest library of SAPUI5 and its stopped working.Our last SAPUI5 Version was 1.8 now its 1.42.

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

2 Answers

Jun Wu Jan 27 at 02:20 PM
0
Share
10 |10000 characters needed characters left characters exceeded
Vaibhav Maheshwari Jan 29 at 04:22 AM
0

Your current code is not working since the Syntax for binding the aggregation has been changed in the releases after your last version.

Use the new syntax ( as mentioned by Jun Wu) which should make your code work like earlier.

var afilter = [];

filter2 = new sap.ui.model.Filter("CreatedOn",sap.ui.model.FilterOperator.BT,fdate,tdate);

afilter.push(filter2);

var filter = new sap.ui.model.Filter("Type" ,sap.ui.model.FilterOperator.EQ,'A');

afilter.push(filter) table.bindRows('/DoaReplacerepSet',{ filters : afilter });

table.setModel(odata);

Share
10 |10000 characters needed characters left characters exceeded