cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 SmartFilterBar setFilterData Issue

Former Member

Hello experts,

I am making a demo of SmartFilterBar. I am having a smart filter and a smart table which works fine. And I want to specify the filter programmingly. I am doing it this way:

filter.setFilterDataAsString('{"CompanyName":{"value":"sap","ranges":[],"items":[]}}', true);

But after that,

  1. the new filter data does not show from UI,
  2. the smart table area turns to gray,
  3. the table data does not refresh.

I also tried method setFilterData the same way, but got same result.

Could anyone help?

Thanks in advance

Ray

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

I think you have to add ControlConfiguration for every key you want to edit dynamically. In your case add to it:

<smartfilterbar:ControlConfiguration key="CompanyName" hasValueHelpDialog="false" 
        	visibleInAdvancedArea="true" visible="true" />
Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi XG Liu,

Could you share your project on Github for us to take a look or debug?

Smart components work best while using Odata v4 with annotations. So you don't need to code filters manually.
However it is possible to create a Smart Table app with filters manually. But you will have to take care of a lot of stuff manually.

I have found that each time I need to deal with a SmatTable app I really need to dig deep into the debugger to understand what it needs to be done.

Regards,
Ivan