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)
Creating multiple outputs for record with quantity field greater than 1
bgall117
<p>I have a data set that has a quantity field. I am trying to display each record in a table once per quantity value. For example, if the quantity is 1 it should show once. If the quantity is 3 it should display 3 times in the table. Is there a way to do this?</p>
Find more posts tagged with
Comments
GLO_FR
<p>Hi,</p>
<p> </p>
<p>do you want x separate rows/cells or x time the label in a cell ?</p>
<p>this</p>
<pre class="_prettyXprint _lang-">
NAME | VALUE
+
TOMATO | 3
+
TOMATO | 3
+
TOMATO | 3
+
</pre>
<p>or this</p>
<pre class="_prettyXprint _lang-">
NAME | VALUE
+
TOMATO |
TOMATO | 3
TOMATO |
+
</pre>
bgall117
<p>If I have the data set result</p>
<p>Item | Location | Qty</p>
<p>
</p>
<p>1 | Kitchen | 3</p>
<p> </p>
<p>I want to display the result three times like this</p>
<p> </p>
<p>Item: 1 Location: Kitchen</p>
<p>Item: 1 Location: Kitchen</p>
<p>Item: 1 Location: Kitchen</p>
GLO_FR
<p>So the easiest way to do it is to create a text field and write javascript code like</p>
<pre class="_prettyXprint _lang-">
var myString="";
for(i=0;i<row["QTY"];i++) {
myString += "Item:" + row["ITEM"] + " Location: " + row["LOCATION"] + "<br>"
};
myString;
</pre>