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)
Create a hash from teh table data
vash
Hi, I want to store some data from a joint table set to a hash.
Since there are no call-back methods available on a joint data set, i create a table and bind it to the joint data set.
I use the following script to put data in a hash in the 'onCreate' method of the table:
var key = row["d::key"];
var val = row["d::value"];
if(row["d::group_id"] == 0 && row["d::bucket_id"] == 0){
globalvar1[key]=val;
}
d - is the joint data set.
globalvar1 is defined as a persistentGlobalVariable in the 'initialize' method of the report.
The same script works on a regular dataSet. But its not working on the table.
I dont think the globalvar1 is getting populated - because when I try to display some value from it - it comes back as undefined.
Any help will be appreciated.
Thanks,
vash
Find more posts tagged with
Comments
mwilliams
Hi Vash,
Do you grab the object from the PGV? Or do you just try to use the variable? Maybe this is just a section of your script? Do you get any errors? Let me know.
vash
Michael,
I just use the variable.
Using the variable and the same script on a regular dataSet - works just fine.
I get no errors.
If you can even point me in the direction - of how to populate data from the table into a hash - that will be great.
Thanks,
Vash
mwilliams
Can you recreate what you're doing in a report made with the sample database that I can run? This way I can see what exactly you've done and then test with the file as well. Thanks!