cancel
Showing results for 
Search instead for 
Did you mean: 

How to stringy sapui5 smartfilterbar getFilters()

0 Kudos

Hi,

I want to call OData get call with filter query from UI. I am using SmartFilterBar control. It has getFilters() method which returns all applied filters.

If I make a call like below, I can easily use it:

ODataModel.read(read("/EntitySet", { filters: smartFilterBar.getFilters();

But I wan to use sap.ui.model.odata.ODataModel's batch method createBatchOperation(sPath, sMethod, oData?, oParameters?) to make a GET call.

The problem here is, I can not pass filters in oParameters here. We have to pass filter in sPath as string.(e.g; EntitySet?$filter=(Plant%20eq%20%271000%27))

It means I have to stingify the smartFilterBar.getFilters(), and pass that string in sPath URL.

Could anyone suggest a better solution here?

Accepted Solutions (0)

Answers (0)