Skip to Content

Apply filter on Datasource dimension using a button in Design Studio

Hi, I am new to the topics on Design studio and relevant CSS for custom applications, got a business requirement to have several list boxes and Check box groups on top and user will select certain values from the components and then hit the Apply filter, then those the selected filter values to be applied on cross tab data.

The Cross tab uses the DS_1(HANA view) as the source, Dimension 1 and Dimension 2 are also part of DS_1 but not taken into Cross tab rows. fig shown below describes it,

List box and check box are using Data binding function of DS_1 as source values, but the target binding not chosen any thing. I would need to apply the target binding on DS_1 dimensions 1 and dimension 2 on click event of Apply filter button, so that filter action on cross can be done with the button.

Can you please assist me, how should be the CSS looks like for this?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Nov 24, 2016 at 07:44 AM

    Hi Sreekanth,

    You can implement your requirement by including the following code in the "Apply Filter" button "On Click" event script:

    DS_1.setFilter("Dimension 1", LISTBOX_1.getSelectedValue());
    DS_1.setFilter("Dimension 2", CHECKBOXGROUP_1.getSelectedValues());

    However, keep in mind that you may end up with undesirable results if you filter all together instead of applying cascading filters because you may end up with invalid combinations of selections in the Listbox and Checkbox Group.



    Add comment
    10|10000 characters needed characters exceeded

  • Nov 24, 2016 at 02:42 AM

    Why do you need CSS for this? Have you followed the SAP Help at

    If the requirements are that the consumer needs to filter on some dimensions, consider looking at the filter components first

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 24, 2016 at 05:51 AM

    Hi Tammy, actually user preferring to use check box group and list box, instead of filter components like, Dimension filter or filter panel.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 11, 2018 at 01:25 AM

    Hi All,

    I have a similar situation, I have 4 text boxes displaying data from a datasource (DS_1) which are nothing but count of a measure which is in 4 different buckets. That is, count of rows if the measure value is between 0 to 300, 301-600, 601-900 and 900+.
    And a cross tab below those text boxes showing all the rows by default. If user clicks on any of the text box, the cross tab should filter the records and show only those those records which match the conditions defined above.
    To Implement this, I wrote the following in On click event of the text boxes : DS_1.setFilter("Measure1", {"low":"0", "high":"300"});

    And similar code in respective text box's On click event. But when i click on the text boxes the cross tab does not filter the records. Am I doing
    anything wrong.
    I am using Lumira Designer 2.0.

    Thank you,

    Add comment
    10|10000 characters needed characters exceeded