<?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 Sort/Filter a collection based on conditions in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97444#M45446</link>
    <description>&lt;P&gt;Thanks for the Input at quick time. Doing in the same way.&lt;/P&gt;
&lt;P&gt;
&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rohan&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2023 14:40:02 GMT</pubDate>
    <dc:creator>RohanGoswami1</dc:creator>
    <dc:date>2023-03-21T14:40:02Z</dc:date>
    <item>
      <title>How To Sort/Filter a collection based on conditions</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97439#M45441</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;I need some sort of help to understand how to achieve this in code&amp;nbsp;&lt;BR /&gt;Suppose a i have a collection with fieldname Doc# which has 3 rows 1145202, 1005203, 1145204&lt;BR /&gt;I need to get the row which has highest last 2 digit in Doc# column. Can we do this via Sort/Filter collection or any other approach?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Rohan&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 09:29:34 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97439#M45441</guid>
      <dc:creator>RohanGoswami1</dc:creator>
      <dc:date>2023-03-21T09:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: How To Sort/Filter a collection based on conditions</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97440#M45442</link>
      <description>&lt;P&gt;Hi Rohan&lt;/P&gt;
&lt;P&gt;
&lt;/P&gt;&lt;P&gt;This can be achieved by Linq in code stage&lt;/P&gt;
&lt;P&gt;Use the below code&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OutColl = (From row in InColl.AsEnumerable() _&lt;BR /&gt;Order By Cint((row(FieldName)).Substring(row(FieldName).Length-2)) Descending Select row).CopyToDataTable&lt;/P&gt;
&lt;P&gt;OutColl is output Colletion , InColl is input collection , FieldName is column name in which the sorting should be done this build for descending based on last two digits&lt;/P&gt;
&lt;P&gt;if you think to make it more dynamic you can use variable for order and digits length&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="35405.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/35468i6D2D8B5FB8E84D11/image-size/large?v=v2&amp;amp;px=999" role="button" title="35405.png" alt="35405.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="35406.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/35469i8B2DCBF96A5CF593/image-size/large?v=v2&amp;amp;px=999" role="button" title="35406.png" alt="35406.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="35407.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/35471iFAA2189B85602585/image-size/large?v=v2&amp;amp;px=999" role="button" title="35407.png" alt="35407.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;
&lt;/P&gt;&lt;P&gt;Hope this is what you expected result&lt;/P&gt;
&lt;P&gt;Also refer to &lt;A href="https://community.blueprism.com/communities/community-home/digestviewer/viewthread?MessageKey=99472cf6-1d84-4d4b-9fc7-12186ba65599&amp;amp;CommunityKey=3743dbaa-6766-4a4d-b7ed-9a98b6b1dd01#bm99472cf6-1d84-4d4b-9fc7-12186ba65599" target="test_blank"&gt;https://community.blueprism.com/communities/community-home/digestviewer/viewthread?MessageKey=99472cf6-1d84-4d4b-9fc7-12186ba65599&amp;amp;CommunityKey=3743dbaa-6766-4a4d-b7ed-9a98b6b1dd01#bm99472cf6-1d84-4d4b-9fc7-12186ba65599&lt;/A&gt; thread for detailed steps of building&lt;/P&gt;
&lt;P&gt;
&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 10:19:40 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97440#M45442</guid>
      <dc:creator>plnarayana777</dc:creator>
      <dc:date>2023-03-21T10:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: How To Sort/Filter a collection based on conditions</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97441#M45443</link>
      <description>&lt;P&gt;Attaching object with little more dynamic&lt;/P&gt;
&lt;P&gt;Please let me know if this is working for you&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 10:59:18 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97441#M45443</guid>
      <dc:creator>plnarayana777</dc:creator>
      <dc:date>2023-03-21T10:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: How To Sort/Filter a collection based on conditions</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97442#M45444</link>
      <description>&lt;P&gt;Thanks for the Solution it is working fine. Is there any way we can do it through process? by not creating a object?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 13:48:56 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97442#M45444</guid>
      <dc:creator>RohanGoswami1</dc:creator>
      <dc:date>2023-03-21T13:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: How To Sort/Filter a collection based on conditions</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97443#M45445</link>
      <description>&lt;P&gt;if you want to do without code stage then check this solution&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add one more column the collection using utility - collection manipulation (Append Field)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;loop through the collection , use calculation stage (Right function) to set last two digits to added column&lt;/P&gt;
&lt;P&gt;Once loop is completed - sort the collection with Sort collection action of utility - collection manipulation&lt;/P&gt;
&lt;P&gt;Hope this helps you&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 14:22:14 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97443#M45445</guid>
      <dc:creator>plnarayana777</dc:creator>
      <dc:date>2023-03-21T14:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: How To Sort/Filter a collection based on conditions</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97444#M45446</link>
      <description>&lt;P&gt;Thanks for the Input at quick time. Doing in the same way.&lt;/P&gt;
&lt;P&gt;
&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rohan&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 14:40:02 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-To-Sort-Filter-a-collection-based-on-conditions/m-p/97444#M45446</guid>
      <dc:creator>RohanGoswami1</dc:creator>
      <dc:date>2023-03-21T14:40:02Z</dc:date>
    </item>
  </channel>
</rss>

