Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9146

Cannot Pass Array of Filters to Table.bindRows()

$
0
0

Dear Colleague,

 

We are trying to create an array of filters based on our search criteria and passing this array of filter to the Table.bindRows() method.

On Execution, the binding happens only for the first element in the filter array, rest of filter criterias are not considered.

 

Explaining through code,

This is where we construct array of filters, The below statement goes in a for loop.

var arr = New Array();

var aflt1 = new sap.ui.model.Filter(escape(gFilterAttribute),sap.ui.model.FilterOperator.Contains,escape(gFilterTerms));

arr.push(aflt1);

 

and our filters internally might have: sPath eq Value for multiple filter criterias like CompanyName 'eq' SAP, CompanyName 'eq' Tecum etc...

 

And we bind the data using this filters through,

oTable.bindRows({

    path: "/SalesOrderHeader",

    parameters: {expand: "Buyer" },

    sorter: sort1,

    filters: arr

});

 

Currently the binding happens only for first element of the array i.e., 'SAP' and all the other filter terms are left out.

 

Help required to pass this array to filters in anyways to bindRows() method.

 

Thanks in advance!

 

Vijay


Viewing all articles
Browse latest Browse all 9146

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>