on 09-16-2015 5:39 PM
Hi,
I am using odata to display data in a UI5 table like below:
var oModel= new sap.ui.model.odata.ODataModel( ".../customer_at.xsodata/", false);
oTable.bindRows("/_customer_at?$filter=ACTIVE_FLAG eq 'Y'");
Data is being displayed as expected in the table.
But when I try to filter on any of the fields in the table, no data is being displayed.
In other words, the problem is - if I use a filter in the odata call, I can't filter on any field in the table.
Appreciate any thoughts on this.
Thank you
Hello Shyam,
in the UI5 coding I would use sap.ui.model.Filter to define a filter. For your example like following:
...
oTable.setModel(oModel);
oTable.bindRows("/_customer_at");
...
var oFilter = new sap.ui.model.Filter("ACTIVE_FLAG", sap.ui.model.FilterOperator.EQ, "Y");
oTable.getBinding("rows").filter([oFilter], sap.ui.model.FilterType.Application);
...
Best Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shyam,
I'm not seeing an issue with your syntax. I wonder if it's a data type issue. Is ACTIVE_FLAG an nvarchar?
-Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.