Skip to Content
avatar image
Former Member

Passing to multiple prompts using script


I have a bunch of drop-downs in my dashboard.

After making selections in all of the drop-downs, I would like to pass them together as input to the prompts in the query using a button. For this I've added a button with script as shown below:

DS_1.setVariableValue(Variable1, dropdown_1.getSelectedValue());

DS_1.setVariableValue(Variable2, dropdown_2.getSelectedValue());

DS_1.setVariableValue(Variable3, dropdown_3.getSelectedValue());


By doing so, does it apply all the variable values at one go or will the 2nd line be called only after the the 1st has been completed ?

Also, would it make sense to use the event "On Before Prompts Submit" in this case for setting the values of variable2, variable3 using a function ? I am not opening the prompt dialog.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 29, 2017 at 09:03 PM

    Viren - on your first question, my experience has been the former, not the latter.

    On your second question, please see Karol's document here regarding "on before prompt submit"

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Viren,

      Karol's document that Tammy originally referenced confirms that the "On Before Prompts Submit" event is only triggered for the Prompt Dialog, as per the following excerpt:


      Reaction on Variable Changes (New Event).

      There is a new event introduced on APPLICATION level - "On Before Prompts Submit". This event allows you to react on changed variables and e.g. change some of those shortly before the prompts get submitted. This can be used for the "simulated merge scenario".

      Pic. 5. New Event "On Before Prompts Submit"

      The event is located here in the Data Source state model - this event is triggered on application level and is data source independent!

      Question: When is this Event triggered exactly?

      Answer: This event is executed only when you press "OK" on the prompt dialog. It is placed to be able to react on the prompt dialog.