Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Runtime parameter issue
sairag
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
Find more posts tagged with
Comments
mwilliams
Are you getting any errors? Or just no results?