Runtime parameter issue [message #885929] |
Wed, 13 June 2012 18:08  |
Eclipse User |
|
|
|
Hi - I have the following query in my dataset.
=====================================================================================
select ASSETID,ASSETURN,ASSETNAME,"ASSET-SOURCE-NAME" from erruser.RPT_CLASSIFIERS_36
WHERE "ASSET-SOURCE-NAME"='COMMON_LIB'
=====================================================================================
And I am using the below scirpt in beforeopen for the same dataset, to pass runtime Library_Id value.
=====================================================================================
//Here I am passing the table name in runtime
var id = new String(params["libraryID"]);
var name = new String(params["ASSET_SOURCE_NAME"]);
var num = id.substr(id.indexOf(':',0)+1,id.length);
query = new String(this.queryText);
query = query.replace(/(RPT_[a-zA-Z_]+)(\d+)/g,"$1"+num);
this.queryText = query;
=====================================================================================
The above script is working fine as it is. But is I try to pass the 'ASSET-SOURCE-NAME' in run time I am facing issue. I tried with the following script ...
=====================================================================================================
//Here I am passing the table name in runtime
var id = new String(params["libraryID"]);
var name = new String(params["ASSET_SOURCE_NAME"]);
var num = id.substr(id.indexOf(':',0)+1,id.length);
query = new String(this.queryText);
query = query.replace((/(RPT_[a-zA-Z_]+)(\d+)/g,"$1"+num),(/'COMMON_LIB'/,'name');
this.queryText = query;
=====================================================================================================
Please help me with your suggestions and inputs.
Thanks,
AR
[Updated on: Wed, 13 June 2012 19:53] by Moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07872 seconds