Skip to Content
0

Design Studio 1.6 remove variable value from datasource

Apr 04, 2017 at 02:08 PM

390

avatar image

Hello,

I'm using the function DS_1.setVariableValue to fill the variable.
How can i remove the variable value or set it to init state?

Thanks
Stephan

10 |10000 characters needed characters left characters exceeded

Hi Stephan - what is your data source?

And after reading this: https://blogs.sap.com/2014/03/27/design-studio-performance-implications-of-variables/ where it says "Beware of “setVariableValue/Ext” – Use “setFilter” even if a corresponding variable is available" - what is your use for setVariableValue?

0

Hi Tammy,

my data source is a BW query. In the query the variable is used to restriced some of the key figures. That's why we use variable instead of filter. The value of the variable is controled by a dropdown box. In the initial state nothing is set. User can use the dropdown to select single value. But if the user go back to start (home button) I can set the drop down back but currently not the variable value to blank or *

Thanks
Stephan

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Agata L. Apr 04, 2017 at 03:19 PM
0

You can try:

APPLICATION.setVariableValueExt("OMS_MMS", "(ALL_MEMBERS)");

I think the variable needs to be set to optional.

A.

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

Hi Agata,

if I use the paramter "(ALL_MEMBERS)" Design Studio 1.6 shows the warning message in script editor Value is not valid. The BW query does not bring any result.
But I found a solution: I use the selected value of my drop down with DROP_DOWN.getSelectedValue() even if it returns also (ALL_MEMBERS), but it works :-)

0

Sorry for a dumb question. Are you sure you used the Ext setting? You will get a warning you described if you try to use.setVariableValue without Ext, but the script editor should not complain if you use .setVariableValueExt.

0

No dumb question. I checked it again and with method DS_GLOBAL.setVariableValueExt("VARIABLE", "") it works. The Parameter "(ALL_MEMBERS)" doesn't show any script warnings, but during runtime the systems says the value is invalied. Anyway I have my solution now. Thanks for your help.

0
Poovarasan Boopalan Apr 05, 2017 at 05:30 AM
1

Hi Stephan,

If you don't know the value of variable at initial state of dashboard, you can have a global variable(say "variable_value" ) in your application.

In start-up get the vale of your bex variable in this global variable as

variable_value = APPLICATION.getVariableValueExt("VARIABLE");

Then assign it when you needed as below

APPLICATION.setVariableValueExt("VARIABLE", variable_value);


Thanks,

Poovarasan

Share
10 |10000 characters needed characters left characters exceeded