<?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 RE: How to delete certain rows from a collection ? in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45226#M1508</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Another way would be to use the "Copy Rows" action from the Business Object "Utility - Collection Manipulation" if you are absolutely sure that it is always the top 6 rows.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="29839.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/29967i9F82039BC21CC1A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="29839.png" alt="29839.png" /&gt;&lt;/span&gt;&lt;BR /&gt;You can set the source and output collection to the same collection.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Lars&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Lars Vinding&lt;BR /&gt;Faglig koordinator&lt;BR /&gt;Kolding Kommune&lt;BR /&gt;Europe/Copenhagen&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Wed, 23 Mar 2022 12:43:00 GMT</pubDate>
    <dc:creator>LarsVinding</dc:creator>
    <dc:date>2022-03-23T12:43:00Z</dc:date>
    <item>
      <title>How to delete certain rows from a collection ?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45223#M1505</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have an output collection. This collection can have as many rows. Now my requirement is that, I need only top 6 rows and delete the rest of the rows.&lt;BR /&gt;Pls help me achieve this.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance !!&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Swati Agrawal&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Mar 2022 08:18:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45223#M1505</guid>
      <dc:creator>SwatiAgrawal</dc:creator>
      <dc:date>2022-03-23T08:18:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to delete certain rows from a collection ?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45224#M1506</link>
      <description>Hi Swati,&lt;BR /&gt;&lt;BR /&gt;Easy way that you could do this with default actions, would be to create Loop with row copying and merging to some separate collection. Controlling of 6 rows can be done by calculation stage with indexing and simple decision once 6 is reached.&lt;BR /&gt;More advanced way would be create separate code stage for copying given row count or doing queries from collection.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Raivis&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Raivis Lazdāns&lt;BR /&gt;Lead Process analyst/ RPA developer&lt;BR /&gt;Europe/Riga&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Mar 2022 11:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45224#M1506</guid>
      <dc:creator>RaivisLazdāns</dc:creator>
      <dc:date>2022-03-23T11:00:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to delete certain rows from a collection ?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45225#M1507</link>
      <description>Hi &lt;A class="user-content-mention" data-sign="@" data-contactkey="ee428c3f-756e-471c-ab71-d0fe7a9ef951" data-tag-text="@Swati Agrawal" href="https://community.blueprism.com/network/profile?UserKey=ee428c3f-756e-471c-ab71-d0fe7a9ef951" data-itemmentionkey="d4a33805-566b-447f-99e5-93f9e86938bf"&gt;@Swati Agrawal&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You can use some Linq code to achive this.&lt;BR /&gt;&lt;BR /&gt;I attach you to this post the complete object to achieve this.&lt;BR /&gt;&lt;BR /&gt;You need to give to the Action "Select Top" the Collection and the top number that you want to return. As an output, you will get the same collection.&lt;BR /&gt;&lt;BR /&gt;The code looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;dtResult = dt.AsEnumerable().Take((int)ntop).CopyToDataTable();&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Where dt is the Collection, and ntop is the number of rows that you want to get.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps you. And if this solves the problem, remember mark as the best answer.&lt;BR /&gt;&lt;BR /&gt;See you in the community, bye &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Pablo Sarabia&lt;BR /&gt;Architect&lt;BR /&gt;Altamira Assets Management&lt;BR /&gt;Madrid&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Mar 2022 11:02:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45225#M1507</guid>
      <dc:creator>PabloSarabia</dc:creator>
      <dc:date>2022-03-23T11:02:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to delete certain rows from a collection ?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45226#M1508</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Another way would be to use the "Copy Rows" action from the Business Object "Utility - Collection Manipulation" if you are absolutely sure that it is always the top 6 rows.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="29839.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/29967i9F82039BC21CC1A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="29839.png" alt="29839.png" /&gt;&lt;/span&gt;&lt;BR /&gt;You can set the source and output collection to the same collection.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Lars&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Lars Vinding&lt;BR /&gt;Faglig koordinator&lt;BR /&gt;Kolding Kommune&lt;BR /&gt;Europe/Copenhagen&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Mar 2022 12:43:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45226#M1508</guid>
      <dc:creator>LarsVinding</dc:creator>
      <dc:date>2022-03-23T12:43:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to delete certain rows from a collection ?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45227#M1509</link>
      <description>&lt;BR /&gt;Hi Swathi,&lt;BR /&gt;&lt;BR /&gt;as Lars suggested you may use &lt;SPAN&gt;"Copy Rows" action from the Business Object "Utility - Collection Manipulation" or&lt;BR /&gt;&lt;BR /&gt;use "Copy Rows" action from Business Object "Collection". However, Both the actions provide similar functionality, only the input conditions differ.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="29840.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/29970iA11C98F91F062C33/image-size/large?v=v2&amp;amp;px=999" role="button" title="29840.png" alt="29840.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sahana Mohan&lt;BR /&gt;Solution Designer&lt;BR /&gt;Blueprism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Mar 2022 06:41:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-delete-certain-rows-from-a-collection/m-p/45227#M1509</guid>
      <dc:creator>sahana.mohan</dc:creator>
      <dc:date>2022-03-29T06:41:00Z</dc:date>
    </item>
  </channel>
</rss>

