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)
Populating a list or table with a js array
swampDev
Okay, fairly simple question, but I may have to look for another approach...is there a way to take a javascript array (populated in the onCreate phase of the cube), and populate a list or table on the fly (in the onCreate phase) from that js array?
If not, I'm hoping post more information to find an alternative solution.
Thanks!
Find more posts tagged with
Comments
mwilliams
Sorry for the delayed response. You could use a javascript array to populate a scripted dataSet and then use that dataSet to create your cube or table listing. Would this be good enough?
swampDev
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="91969" data-time="1323893597" data-date="14 December 2011 - 01:13 PM"><p>
Sorry for the delayed response. You could use a javascript array to populate a scripted dataSet and then use that dataSet to create your cube or table listing. Would this be good enough?<br /></p></blockquote>
<br />
Hi, I solved the problem another (rather cumbersome) way, but I'm still interested. So do you mean do something like this throughout the iteration of the cube:<br />
<br />
/////////////////////////////////////<br />
if(typeof dataSetRow['mylist'] == 'undefined'){<br />
dataSetRow['mylist'] = new Array();<br />
}<br />
if(typeof i == 'undefined'){<br />
i = 0;<br />
}<br />
dataSetRow['mylist']
= row['data'];<br />
i++;<br />
/////////////////////////////////////<br />
<br />
Then use a list, with a data element inserted defined with: dataSetRow['mylist']<br />
Is that legitimate? Edit: If so, can any array that I create on the fly (other than the dataSetRow array) be used with the list?
mwilliams
Let me make sure I'm understanding what you're doing. You're populating an array with dataCube/crosstab data and want to then display this data in a table or list? If so, you can create a scripted dataSet using this array and display the info in a list in your report. You'll just have to make sure that you put the list after the crosstab in your report so that the array is populated before the scripted dataSet tries to access the data. Let me know.