Skip to Content

Passing to multiple prompts using script

Jan 29, 2017 at 07:55 PM


avatar image


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.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Tammy Powlas
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"

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

Hi Tammy,

Thank you for answering my first question.

I've already looked at the following documents from Karol:

In the document, it is mentioned that - "This event is executed only when you press "OK" on the prompt dialog."

My question is if i do not use the prompt dialog and try to change variables values using the script, will it still call the "On Before Prompt Submit" event ? I ask this because as per the document, the event is placed between "Set Variables" and "Variables Submitted" states.




HI Viren,

Did you tried like this ?

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




Sounds like it might work based on Martin's blog - see - maybe you should try it yourself with your data


Hi Tammy,

I tried it and looks like it works only with the prompt dialog.

Thanks for all the help.


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.