|
Re: Access to a different column in the onCreate script [message #730550 is a reply to message #730454] |
Wed, 28 September 2011 15:35 |
|
Mike,
Why not put it on the onCreate for the row and use
var pm = this.getRowData().getColumnValue("Parameter");
var val = this.getRowData().getColumnValue("Value");
reportContext.setPesistentGlobalVariable(pm, val);
BTW if you are not using this value in a chart you can just use
setGlobalVariable.
Jason
On 9/28/2011 8:49 AM, Mike Wulkan wrote:
> Hi, I have a table that has columns as follows:
>
> Type, Parameter, Value
>
> for this example lets say the values for these columns are:
>
> T, mirror_bypass_target, false
>
> In the onCreate method of the Value column I have the code:
> reportContext.setPersistentGlobalVariable("mirror_bypass_target",this.getValue());
>
>
> This is to put the value into a global variable for use elsewhere in the
> report. Now I have many of these tables to deal with (each with a
> different Parameter name) so I'd like to make this script more generic
> so that I only have to specify "mirror_bypass_target" on the filter
> criteria for the table rather than both in the filter criteria and the
> script itself. I could do this if I could replace the literal value with
> a reference to the value of the Parameter column. Obviously the "this"
> context won't do here. Is there a way to achieve this?
|
|
|
Powered by
FUDForum. Page generated in 0.03375 seconds