...
Add a string parameter to the script. For this example it will be called $aRandomValue .
Code Block #Multiple instances of this script will run for the same colour value param( [Parameter(Mandatory = $false)] [CBSingleSelect] $aSelect, [Parameter(Mandatory = $false)] [String] $aRandomValue )
On the Script Parameters tab, edit the Javascript for the $aRandomValue parameter for the OnLoad event -set it as:
Code Block //load a random value into the field $('#aRandomValue').val(Date.now()); //hide the field and it's label $('#aRandomValue').hide().closest('tr').prev().hide();
The run dialog will then look like this:
Info |
---|
Since the $RandomVal $RandomValue parameter will always have a different value, the dispatcher will always allow the script to run (the dispatcher only denies multiple runs of scripts attempting to run with the same parameter values). |
...