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)
Computed column
sufanf
<p>I have a query that retrieves different numbers for each record where i want to view all values of one column for all rows as follows:</p>
<p> </p>
<p>PONUM DESCRIPTION PRNUM</p>
<p>1w **** 1111</p>
<p>2e hhhh 1234</p>
<p>12w kjdhf 878p</p>
<p> </p>
<p>I wanna display them like this </p>
<p> </p>
<p>PONUM DESCRIPTION PRNUM</p>
<p>1w **** 1111, 1234, 878p</p>
<p>2e hhhh 1111, 1234, 878p</p>
<p>12w kjdhf 1111, 1234, 878p</p>
<p> </p>
<p>Please help!</p>
<p> </p>
<p>thank you!</p>
Find more posts tagged with
Comments
Clement Wong
<p>The technique to use here is to first create/initialize a string variable in the <em>beforeOpen </em>event of the Data Set.</p>
<pre class="_prettyXprint">
savedStr = "";</pre>
<p>Then, create a computed column to add to the variable, and use it for its value.</p>
<pre class="_prettyXprint _lang-">
if (savedStr == "") savedStr = row["JOBTITLE"];
else savedStr = savedStr + ', ' + row["JOBTITLE"];
savedStr;
</pre>
<p>See attached for an example.</p>
sufanf
<p>Thank you for taking the time to reply to my question. I appreciate it!</p>
<p> </p>
<p>However, I am using a scripted dataSet and the field should be built in the query that I have built. Moreover, I am using the field in the master page!</p>
sufanf
<p>I found the solution for it without the need to do any coding. You can add an aggregation and use CONCATENATE built-in function. Then create a column binding and put the aggregation you created under the expression field.</p>
<p> </p>
<p>Even though I solved it, but It would be nice knowing another way of doing it for future reference.</p>
<p> </p>
<p>Thank you so Much!!</p>