cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

mvaibhav
Contributor
0 Kudos

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);

junwu
Active Contributor
0 Kudos