Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Documentation on parameter scripts needed
rpolunsky
I need to figure out how to use the new getSelectionValueList and getDefaultValueList parameter event scripts. Is there any documentation on these? I saw the notice about 2.5 M7 where they were being provided but can't locate any clarifying reference.
Find more posts tagged with
Comments
mwilliams
Hi rpolunsky,
I don't find any documentation on this method either. What are you trying to do with each one. Maybe I can help troubleshoot.
Virgil Dodson
Hi Richard,<br />
<br />
Starting with BIRT 2.5, you can now define default parameter values that are based on an expression, but this works well for single values. The getSelectionValueList event lets you write script to fill the parameter options dynamically... and the getDefaultValueList let you decide using script which of those values are automatically selected for the user. An example is enclosed created with BIRT 2.5.1<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
getSelectionValueList:
var allParams = [];
allParams[0] = "103";
allParams[1] = "112";
allParams[2] = "114";
allParams[3] = "119";
allParams[4] = "121";
allParams[5] = "124";
allParams[6] = "125";
allParams;
</pre>
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
getDefaultValueList:
var defaultParams = [];
defaultParams[0] = "103";
defaultParams[1] = "114";
defaultParams;
</pre>
martin.d
I also had trouble finding documentation about what was possible with the parameter scripts.
I tried to do something that sounds simple: Select all values by default.
Because I use a DataSet to retrieve the list of the possible values, I figure out that the best option was probably to return the list the values in the "getDefaultValueList" script.
However I was not able to find an example doing something similar or even to find the properties I can access from this script.
I'm using BIRT 3.7.1
Could anyone point the right direction for me please?