Skip to Content
avatar image
Former Member

Unassigned Data Source and Mandatory Query Variables without Default Value

Hallo experts,

i have question regarding query variables in Design Studio.

First off we are working with SAP BO DS 1.6 SP1 P1 on BIP 4.1.

I have created an application, which features an unassigned data source. This data sources is assigned to a query by user's choice at runtime. This assignment is done in the OnStartup script along with some other routines (e.g. Setting Icons and texts depending on the query). Everything is working fine unless the query contains a mandatory variable without Default value. In this case the the varible prompt is shown, displaying Errors

"Specify a value for variable ..." and error during the script processing. This leads to the termination of the OnStartup script resulting in a Kind of corrupt state of the application.

As the query is selected by the user at runtime it is hasd to set default values in the script at design time.

Do you know of any method to avoid this issue?

Kind regards


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 24, 2017 at 10:16 AM

    Hi Christian,

    Did you try setting the Application property Force Prompts on Startup to false? Although this may not impact dataSources loaded by script but you could check.

    By the way, can you provide the script you are applying to load the user-selected data source?



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 24, 2017 at 11:23 AM

    Hi Mustafa,

    Force Prompts on Startup has been set to false already. When a query with other variables is selected, I can force prompts without the script being terminated. Everything works fine there. The issue only occurs when mandatory variables without Default value are used.

    Please find the script below. The URL Parameter "X_g_query" is passed to the application from another DS App. Depending on user's choice:

    // set date in header



    //start in bookmarks if needed

    if (X_g_bm == "BM") {

    g_actionsheet = "BM_LONG";



    }else {

    //set icon according to report

    if (X_g_icon !== "") {ICON_REPORT.setIconUri(X_g_icon);}

    if (X_g_istyle !== "") {ICON_REPORT.setCSSClass(X_g_istyle);}

    //set query

    if (X_g_query !== "") {

    DS_1.assignDataSource("cuid:AcjhszDsRMBOgzbwNugblhM", "QUERY", X_g_query);


    DS_1.setVariableValueExt("SR_TCUR", X_g_curr);


    // set dropdown filters


    if (DS_1.isInitialized()) {

    // check variables and disable Prompt Icon, if no input ready variables available

    var variables = DS_1.getVariables();

    var prompt_possible = false;


    variables.forEach(function(variable, index) {

    if (variable.inputEnabled == true) {

    prompt_possible = true;




    // get DataSource information for Header Title

    if (DS_1.getInfo().queryDescription) {




    elseif (DS_1.getInfo().queryTechnicalName) {




    // set initial mode

    g_display_mode = "TABLE";

    g_designer_mode_on = true;

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Mustafa,

      thank you very much for the clarification.

      The behavior of the script is a little strange indeed. If you assign a default value or if the mandatory variable has a default value and force prompts is set true then the script continues as expected. However, if there is no value assigned to the mandatory variable, then the script is terminated and the application is not set to the proper state.

      Best Regards,