Skip to Content
0

get filters applied on smart table

Oct 18, 2017 at 08:54 AM

52

avatar image
Former Member

HI Experts,

Can anyone tell me to get the filters applied on smart table in a controller in sap UI% application?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Arjun Biswas Oct 18, 2017 at 09:37 AM
0

In smart table control you have the getSmartFilterId method. It returns the current value of property smartFilterId. Check the foll. link :

https://sapui5.hana.ondemand.com/#/api/sap.ui.comp.smarttable.SmartTable/methods/getSmartFilterId

From the id, may be you can get the filter parameter. Initially check what it returns in the console, then you can try to get the filter parameter.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Arjun Biswas,

Thank you so much for the reply, and i have used another way to get the filters applied,

var oTableData = this.getView().byId("tableId").getBinding("items");

var sortedData = oTableData.sSortParams;

var filtersData = oTableData.sFilterParams;

this is working for me now :)

Regards,

Pradeep

1