Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 27 at 02:20 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Jan 29 at 04:22 AM

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

    Add comment
    10|10000 characters needed characters exceeded