Skip to Content
0

variables in design studio 1.6

Nov 18, 2016 at 02:25 PM

1.3k

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Tammy Powlas
Nov 18, 2016 at 02:33 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 19, 2016 at 10:00 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 20, 2016 at 06:55 AM
0

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

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Varun,

You can pass the values to variables in "on Variable initialization" in dashboard and also you can hide the prompt window in start up.

Even if the user gives the prompt value to that data source wrongly, you can clear it in on result set change of that data sorce.

Thanks,

Poovarasan

0
Former Member
Former Member

HI ,

Thanks for your reply. you mean if you enters may 2016 in prompt we can clear that filterin on result set chnage of data source?

if that is case this is what i am looking for

but what scripting it require . its ds1.clearfilter(); or any other thing?

Thanks,

Varun

0
Former Member
Former Member

Hi Varun,

You can Use DS_1.setVariablevalueExt("Variable", ""); to clear value of prompt.

Thanks,

Poovarasan

0
Former Member
Former Member

HI ,

I Have tried by writing same script in on result set change of data source , i am getting below error

could you please guide me

7lqro.png (8.0 kB)
0
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

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

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi ,

Thanks for your reply.actually already we have 13 queries in application so m just thinking is there any workaround .

For one page need to by pass prompt value because if we keep merge prompt to true it will pass to all pages right .my expectation is when I click on button while going to second page to that page need to exclude prompt value which was give by user .is there any workaround?

Thanks,

Varun

0
Former Member
Former Member

Are you using the standard prompt dialog? If so, can you get rid of it? For example you could use two dropdown controls for your two variables. As soon as you get rid of the standard prompt dialog (which frankly has always been more of a joke), you will have the freedom to unmerge your varables. You would have to do it anyway at some point to resolve performance issues with your 13 queries, as it's a prerequisite for configuring parallel query execution and refreshing only relevant queries at page selection. So use a custom prompts dialog, unmerge the variables, introduce the 14th query, and resolve the performance issues using the mentioned techniques.

0

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

0