Skip to Content
avatar image
Former Member

variables in design studio 1.6

HI Experts,

Searched blogs before posting

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

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

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

I have some issues with merge prompts .

Here is the issues

I have 2 variables Year and hierarchy and i kept merge prompt to true we have same variables for all data sources.

So whenever i am selecting year in prompt lets say 2015 so this is was passing to all pages implicitly . but here i need for one page user need to see all years data . how to do that?

i tried with ds.clearfilters(0; but no luck i need to avoid prompt value what user is entering irrespective of prompt value it should show all values for one page

any solution?

Thanks,

Varun

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Nov 18, 2016 at 02:33 PM

    Varun - first, a best practice for dashboards is no variables at all; why not use the filtering options Design Studio offers?

    That said, why doesn't Mustafa's reply in the first thread work for you? https://archive.sap.com/discussions/thread/3957249

    Another option is to create a second data source to the first one that passes all the years

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 19, 2016 at 10:00 AM

    Hi Varun,

    If you want a data source to get not affected you have to set merge prompts false.

    In coding part even after setting merge prompts false you can use

    Application.setVariablevalueExt("Variable", "Value");

    to set the value for variable and the clear the variable value for required data source by passing empty value for the variable.

    DS_1.setVariablevalueExt("Variable", "");

    Thanks,

    Poovarasan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 20, 2016 at 06:55 AM

    hi ,

    I agree to your answer but if we keep.merge prompt to false user will see all variables during startup right so user may misunderstand which to select

    Hope you got it

    Thanks,

    Varun

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Varun,

      You have to write the coding inside a condition as

      if(DS_1.getVariablevalue("variable") != "")

      {

      DS_1.setVariablevalueExt("Variable", "");

      }

      Because, passing value to datasource will refresh the data source again. So it will cause a loop if set variable value without any condition.

      Thanks,

      Poovarasan

  • avatar image
    Former Member
    Nov 20, 2016 at 09:04 AM

    If you need a prompt on all pages but one, why not create a separate query without the variable specifically for this page?

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Varun,

      As per your scenario, if you are not convenient to use the merge prompt, you can follow the below steps,

      1.Maintain text variable in the application and make it as false.

      2.Pass the prompt value to the text variable.

      3.Then you can use this text variable in the enter application in all pages and you can pass this text variable to second page prompts using scripting.

      DS_1.setVariablevalueExt("Variable", "text variable");

      Regards,

      Vidhya.C