Skip to Content
avatar image
Former Member

info chart is not filtering based on user prompt value (design studio 1.6)

HI Experts,

Searched blogs before posting

https://blogs.sap.com/2014/09/11/how-to-pass-a-filter-to-data-selection-in-chart-2nd-data-source-with-modification-on-the-way/

https://archive.sap.com/discussions/thread/3813702

I would like to explain the issue what i am facing in the project

I have total 7 data sources each data source all data sources having same kind of variables(similar technical name).

1. one is cal YYYY MMand 2. hierarchy

so , my scenario is on landing i have KPi tiles. so when i click on tiles it should go to second page and get filtered with

cal YYYY MM and

hierarchy

so i am able to pass hierarchy to next page by using set filter . but problem with Cal YYYY MM . i have 4 charts in second it should get filter with hierarchy and

cal YYYY MM. Hierarchy it was fine . but year it was not taking.

for example if i am selecting may in prompts in charts till may i should see bars .

if i am keeping merge prompts as true automatically the variable will pass to all other data sources right?

so initial i didnt write any script to filter the data for

cal YYYY MM

as it was behaving strange charts are not getting filtered so tried below scrpiting but no luck

var y = DS_2.getVariableValueExt("PA_V_A_MM_YYYY");
DS_2.setVariableValueExt("PA_V_A_MM_YYYY", y);

can any one please guide me on this?

In below screen shot i selected prompt as may 2016 . it should be till may .(bar) but it was showing all data whatever data is available.

when i click on tile in first page it should get filtered with year in second page and display detail level data.

Thanks,

Varun

wb9gp.png (2.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Nov 08, 2016 at 05:49 PM

    Hi varun,

    Have you checked that is there any value by default in the variable ?

    Because there may be no value to the variable so the empty value may be passed to it.

    Then the merge prompts will allow you to pass values to all the data sources with given variable. For the you need to pass value using the code

    Application.setVariableValueExt();

    Thanks,

    Poovarasan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 08, 2016 at 05:59 PM

    hi.,

    Thanks for your reply .I need to pass this code in on startup?

    I am having cal yyyy mmm variable .so I need to capture that variable and pass in application.setvariablevalueext(calyyyymm,var)

    Are you trying to say this?

    Please correct me if I am.wrong?

    Thanks,

    Varun

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 08, 2016 at 06:23 PM

    Hi varun,

    Initially you have to check the value of your variable what it holds at startup of application. So use getVariableValueExt(); to check it.

    Then pass the value to the value in required format to the variable, because external format of date changes based on region.

    Yes for that you have to use Application.setvariablevalueext() code.

    Thanks,

    Poovarasan

    Add comment
    10|10000 characters needed characters exceeded