Skip to Content
avatar image
Former Member

Display Filtered Values

Hi Friends,

I have a report which is built on Bex Query. Query has got some mandate prompts based on Calmonth and Fiscalyear.

I am using Filter button in my report to display the Bex Query Prompts as shown in the below screen shot

Now, i want to display the selected filter values as text so that the user can know what are the filtered values.

I did some work around but couldn't succeed.

Some how i did manged to display the selected values from the chart component as shown below.

Here i selected the GENERATION company code which is displayed. In the same way i want to display the selected Bex Query Prompt values.

Your Help will be greatly appreciated.

Thanks,

Madhu

Screen shot3.png (178.0 kB)
Screen Shot2.png (189.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 15, 2015 at 09:14 AM

    Hi Madhu,

    If you are using Design Studio 1.5 version we have a component called Filter line that displays the Filters applied to the datasource.

    Try implementing this component on your application to display the filter values. We could also perform additional filters by clicking on the + button (top left).

    Let me know if this solves your problem.

    Thanks,

    Kavya


    filterline.JPG (21.3 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Madhu,

      If you wish not to display all the objects in Filter line menu. you could restrict those using css. Identify which row(s) you want to hide and find their css class and provide the following code:

      style= "display: none"

      Add this code in a css file & add it to your application as 'Custom CSS'

      Thanks,

      Kavya

      before css.JPG (16.4 kB)
      after_css.JPG (88.9 kB)
  • Oct 15, 2015 at 02:01 PM

    You can use the method

    var text = DS_1.getVariableValueText("0I_CALMO");

    or

    var text = DS_1.getVariableValueExt("0I_CALMO");

    to store the text value or key in a variable or use it in a Text component

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 15, 2015 at 02:48 PM

    You can use

    DS_1.getVariables().forEach(function(element, index) {

      DS_1.getVariableValueText(element);

    });

    to read all variables from the Datasource. Then with element you can fetch the texts for all of the variables in the Query and write it somewhere to display it to the User.


    Best Regards,

    Dominik Herrmann

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2015 at 08:08 AM

    Thanks to all for your feedback.

    @Kavya: I am very new to this tool and started using this tool very recently. Can you please guide me how and where can i find CSS Class.

    @D.Chang & Dominik:

    Correct me if i am wrong or didn't understand you.

    As per your post i should set DS_1 (data source) as source in Text component and should use the var text method. But i need to display filter values as per the Filter Button Selection. In my report i used a Filter Button to provide Filter Objects for the user so they can filter as per requirement. For this Filter Button (as per screen below) i am not using any Data Source (DS_1).

    To get this Bex Query prompts i used the method

    APPLICATION.openPromptDialog(500, 500);

    So i need to display only this selected values.

    Regards,

    Madhu


    Screen shot3.png (178.0 kB)
    Screen Shot1.png (174.0 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • The Prompt filters are defined in the BEx query.

      When you use a Bex query in design studio it will be mapped to DS_1 by default.

      If you use the script that we provided you should get a correct result. Did you try it?

      just store the value that someone entered in the prompt using the getVariableText() method in a design studio variable (String).

      Then use this string to display the filter value, for instance Text_1.setText()

      or BUTTON_1.setText()

      Regards,

      Dwain

  • avatar image
    Former Member
    Oct 19, 2015 at 07:47 AM

    Hi Dwain,

    I didn't try it. I am working a other way round using Filter Panel Component. But i will try the solution you provided.

    Thanks for all for your valuable feedback.

    Regards,

    Madhu

    Add comment
    10|10000 characters needed characters exceeded