<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Adding new row of Data to Collection in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Adding-new-row-of-Data-to-Collection/m-p/55016#M9427</link>
    <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;&lt;SPAN data-preserver-spaces="true"&gt;I am just learning and trying various things out, and this is not part of a larger project. I am trying to take a single row of data and append that to an existing collection.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-preserver-spaces="true"&gt;The following is an overview:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;I get data using the Webservice Rest Action and put that into a collection. The result is a nested collection.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Then I use a Calculation stage to get the row data and store the result into a separate collection that only contains that row.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Now I am trying to take that one row of data and build a collection that is not nested and will contain all the rows of the nested collection. I can't seem to get the new collection to build without overwriting itself with the newest data.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN data-preserver-spaces="true"&gt;I tried the following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Loop stage that loops over the nested collection&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Get the current row of data&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Add a new row to another collection&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Add data to that new row&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;I have also tried adjusting the process and replacing the Add row action with Append Rows to Collection.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN data-preserver-spaces="true"&gt;I know I must be missing something simple, and if anyone can point me in the correct direction, it will be greatly appreciated because I am sure at some point I will want to append separate rows of data to a collection to build a new data set.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-preserver-spaces="true"&gt;Thanks, Drew&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20610.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/20757i18010C5EC9A14AD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="20610.png" alt="20610.png" /&gt;&lt;/span&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20611.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/20756i0F4BA019E7BA9649/image-size/large?v=v2&amp;amp;px=999" role="button" title="20611.png" alt="20611.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20612.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/20758iE2C5B7BB1E5923A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="20612.png" alt="20612.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20613.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/20759i5FB542AA2369DCFC/image-size/large?v=v2&amp;amp;px=999" role="button" title="20613.png" alt="20613.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Andrew Miller&lt;BR /&gt;------------------------------</description>
    <pubDate>Tue, 14 Jan 2020 15:52:00 GMT</pubDate>
    <dc:creator>AndrewMiller</dc:creator>
    <dc:date>2020-01-14T15:52:00Z</dc:date>
    <item>
      <title>Adding new row of Data to Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Adding-new-row-of-Data-to-Collection/m-p/55016#M9427</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;&lt;SPAN data-preserver-spaces="true"&gt;I am just learning and trying various things out, and this is not part of a larger project. I am trying to take a single row of data and append that to an existing collection.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-preserver-spaces="true"&gt;The following is an overview:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;I get data using the Webservice Rest Action and put that into a collection. The result is a nested collection.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Then I use a Calculation stage to get the row data and store the result into a separate collection that only contains that row.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Now I am trying to take that one row of data and build a collection that is not nested and will contain all the rows of the nested collection. I can't seem to get the new collection to build without overwriting itself with the newest data.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN data-preserver-spaces="true"&gt;I tried the following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Loop stage that loops over the nested collection&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Get the current row of data&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Add a new row to another collection&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;Add data to that new row&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN data-preserver-spaces="true"&gt;I have also tried adjusting the process and replacing the Add row action with Append Rows to Collection.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN data-preserver-spaces="true"&gt;I know I must be missing something simple, and if anyone can point me in the correct direction, it will be greatly appreciated because I am sure at some point I will want to append separate rows of data to a collection to build a new data set.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-preserver-spaces="true"&gt;Thanks, Drew&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20610.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/20757i18010C5EC9A14AD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="20610.png" alt="20610.png" /&gt;&lt;/span&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20611.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/20756i0F4BA019E7BA9649/image-size/large?v=v2&amp;amp;px=999" role="button" title="20611.png" alt="20611.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20612.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/20758iE2C5B7BB1E5923A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="20612.png" alt="20612.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20613.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/20759i5FB542AA2369DCFC/image-size/large?v=v2&amp;amp;px=999" role="button" title="20613.png" alt="20613.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Andrew Miller&lt;BR /&gt;------------------------------</description>
      <pubDate>Tue, 14 Jan 2020 15:52:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Adding-new-row-of-Data-to-Collection/m-p/55016#M9427</guid>
      <dc:creator>AndrewMiller</dc:creator>
      <dc:date>2020-01-14T15:52:00Z</dc:date>
    </item>
    <item>
      <title>RE: Adding new row of Data to Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Adding-new-row-of-Data-to-Collection/m-p/55017#M9428</link>
      <description>Hi, Andrew&lt;BR /&gt;Your efforts are highly appreciated! Remember that only patience and hard work will lead you to desirable expertise.&lt;BR /&gt;&lt;BR /&gt;Let's dig into your issue.&lt;BR /&gt;1. Loop through "dataJson" collection.&lt;BR /&gt;2. On each iteration save current row of "dataJson" collection to temp collection "row".&lt;BR /&gt;3. Next step depends on how many rows of data do you have in "row" collection. I suggest you to use Loop stage to loop through "row" collection. It will help you to handle multiple rows in "row" collection and also be applicable for handle single row collection.&lt;BR /&gt;4. Now we actually have access to data in row of "row" collection. So we should add row to "Combined Collection" collection. And use Multiple Calculation stage to copy data from each field of current row in "row" collection to corresponding fields of "Combined Collection" collection.&lt;BR /&gt;&lt;BR /&gt;Hope it helps!&lt;BR /&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Egor&lt;BR /&gt;RPA Developer&lt;BR /&gt;Ernst &amp;amp; Young&lt;BR /&gt;Europe/Minsk&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Feb 2020 08:43:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Adding-new-row-of-Data-to-Collection/m-p/55017#M9428</guid>
      <dc:creator>EgorVavilov</dc:creator>
      <dc:date>2020-02-05T08:43:00Z</dc:date>
    </item>
  </channel>
</rss>

