Skip to Content

get filters applied on smart table

HI Experts,

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 18, 2017 at 09:37 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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