on 08-27-2015 4:07 PM
Hello Experts,
I have created an app which will fetches Accounts using ODATA. My requirement is to fetch ONLY the Active Accounts. I understand this is to be done using ?filter option, but unable to use this.
Can someone please help me understand how would I display only Active Accounts? Right now I am using only "{/AccountCollection}" on Master.xml,
<Table id="catalogTable" class="navTableControlLayout" items="{/AccountCollection}" growing="true" growingScrollToLoad="true">
What modifications will I have to do here?
Thanks in Advance.
Regards,
Chandan
Hi Chandan,
Not sure how it can be achieved in HTML but if it is JS view, below code will do the filtering:
oTable = sap.ui.getCore().byId("catalogTable");
oItem = sap.ui.getCore().byId("items");
oFilter = new sap.ui.model.Filter("Account", "EQ", value);
oTable.bindAggregation("items","/AccountCollection",oItems,null,oFilter1);
Hope this could be pointer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chandan,
Try this -
<Table
items="{
path: '/AccountCollection',
filter: {
path: 'ActiveAccount', //Provide the field name that you wanted to filter
operator: 'EQ',
value1: value //Pass the field value that you wanted to filter
}" >
Regards,
Sai Vellanki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.