Skip to Content

Goal of this document:

  to avoid the initial prompt screen for mandatory variables in Design Studio

/wp-content/uploads/2014/02/mandatory_prompts_389381.png

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 !

/wp-content/uploads/2014/02/edit_global_variables_389382.png

4. Apply variable values in the “On startup” Event of the application in BIAL script
App_on_startup.png

Here is the essential code snippet of the important part

 

APPLICATION.setVariableValueExt(“0P_SAORG”, XOrg);

APPLICATION.setVariableValueExt(“YKAL_M_J”, XJM);

  

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

 

http://localhost:52709/aad/web.do?APPLICATION=SCN_HOWTO&designersessionid=84a5e02ecbc74d4a99410819d03472c7&XOrg=0001&XJM=10.2002

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.

Best regards

Manfred

To report this post you need to login first.

15 Comments

You must be Logged on to comment or reply to a post.

  1. Tammy Powlas

    Hello Manfred –

    I am not sure how I missed this.

    Did you try the last variant with Design Studio 1.2 SP01, released a few weeks ago?

    Personally I try to avoid mandatory BEx variables in dashboards. 

    Thank you for sharing.

    (0) 
    1. Manfred Schwarz Post author

      Hi Tammy,

      I have not yet installed 1.2 SP1 – but i will do in the near future.

      I will test it and get back with my results.

      Hopefully t is fixed or gone in 1.3 ?!?

      (0) 
  2. Peter Chen

    Read the blog twice, but did not see the option to set the variable values in the new variable init event.   This will allow you to skip the prompt screen as the variable values are filled.  The start up event is accessed after the variable call.

    (0) 
  3. Jeroen van der A

    hi Peter,

    in your application component you should have an event property “On Variable Initialization”. If you fill your Bex variables there you should be able to go on without the prompt.

    best regards,

    Jeroen

    (0) 
  4. Dhevya C

    Thanks for the document.

    I added script to On Variable Initialization and default values to Global Script Variables. But i see following error after execution. Any idea why?

    Design Studio Version: 1.2 SP1

    Unknown Error

    While processing the current request, an exception occurred which could not be handled by the application or the framework.

    Log ID:

    e7769e6e-a542-4241-9ef3-95e498bd8ae8

    Unable to process request. Contact your system administrator.
    To facilitate analysis of the problem, keep a copy of this error page

    Thanks,

    Dhe.

    (0) 
  5. Nilesh Patidar

    Thanks for documentation.

    I have also follow the same steps to bypass mandatory filter, but in my case after following all step it still prompting mandatory Filter screen.

    In my case I am using BW Query and DS 1.3, Can you please help me to come out from this issue.

    Thanks,

    Nilesh

    (0) 
    1. Nilesh Patidar

      This issue was solved, Now I am doing Step 4 stuffs into “On Variable Initialization” method of the Application instead of “On Startup” method.

      Thanks

      Nilesh

      (0) 
  6. Arjun K T

    Hello Manfred,

    Thank You for the nice blog!

    I have a data source with Mandatory prompt and no default value assigned .

    I assigned  “load in Script” of the Data source is set to “true” .

    On Variable Initialization “APPLICATION.setVariableValue(“Month_date”, “01-Jan-2014”); “

    On Start Up “DS_1.loadDataSource();”

    But still am getting Mandatory prompt screen when opening the DS.

    I have tried giving “DS_1.reloadData();” in the second line of On Start Up as mentioned above.But no change .

    Any Idea to resolve this!!

    Am using DS 1.3.

    Regards

    Arjun KT

    (0) 
    1. Karol Kalisz

      if you want to use the event “On Variable Initialization” you should not instanciate the data source in script, but have it instantiated directly. data sources which are not instanciated in beginning cannot be taken into count in the event “On Variable Initialization

      (0) 
  7. Ivan Zhou

    Hello Manfred,

    Thank You for the nice blog!

    And I found another case that how to set a range default value to Mandatory prompt?

    e.g.:from date ~ to date.

    Thanks in advance.

    Regards,

    Ivan

    (0) 
  8. E. Lokenberg

    Hi Manfred,

    I get the mandatory prompt screen as well. Even if I follow your blog, I get to fill two prompts.
    The original from the BEx query and the one I created myself.

    Now working on 1.4 in the meantime but it still doesn’t seem to be resolved.

    Erik

    (0) 
  9. Chandra Sekhar R

    Hello friends,

    After the code in “On Variable Initialization”, try to make the below property to false.

    Under Prompts–>

    Force Prompts on Startup : False

    This should work.

    Regards,

    Chandra.

    (0) 

Leave a Reply