Possibility to Bypass mandatory prompts on DS startup
Goal of this document:
to avoid the initial prompt screen for mandatory variables in Design Studio
Steps to “solve” the issue
1. Use a bex query and define Defaultvalues for each and every mandatory variable! (please see possible workaround in the future after the 6 steps)
2. Create a Design Studio application and use a BEx query with the prepared mandatory variables from step1.
3. Define script variables and set the URL parameter to true (they must start with a uppercase X). You can even define a
default value here !
Here is the essential code snippet of the important part
If you experience
problems with setVariableValueExt try the equivalent function APPLICATION.setVariableValue(“Promptname”, “Promptkeyvalue”)
5. Start your DS app either in local or in BI-Platform mode and attach your prompts
6. You are finished and you should see the result in your Crosstab or chart – you could print you global variables in a textbox
A variant of this would be to switch the property “load in Script” of the Datasource to “true”. Therefore the datasource is not refreshed at startup and you have to call
“DS_1.reloadData();” in a BIAL script
But by doing this I get Script errors in my “Application.On Startup” telling me, that my Variables that I selected with content assistance are not valid.
I am not sure if this is a bug, but it should work also and you should save a little bit more query execution time (I think with my route the query is processed with the default value and then it is rerun with the promptvalues of my global scriptvariables).
If i run the DS locally or on BI Platform i also get errormessages telling me that my variable name is not valid
Perhabs it is not a bug and this behaviour is as expected – maybe then somebody else can share some information to bypass the unnecessary double load of data.
In case of questions just leave a comment.