<?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: Filter Unique Values Collection in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99456#M47006</link>
    <description>I am really sorry that I misunderstood the question a bit. Yes you were absolutely right, the solution I provided you gives you unique values based on all the fields not only one. I have modified my solution a bit for your requirement. Please find the updated solution as shown below:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pass one collection as an input parameter along with a text data item parameter called "Field Name" and pass another collection as an output parameter and use the below code in the code stage:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Output_Collection = Input_Collection.DefaultView.ToTable(True,Field_Name)&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36188.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36201i5B4A027BF76BCD93/image-size/large?v=v2&amp;amp;px=999" role="button" title="36188.png" alt="36188.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36189.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36199iA4769F77F1F3D352/image-size/large?v=v2&amp;amp;px=999" role="button" title="36189.png" alt="36189.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36190.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36200i39AB44E926B51846/image-size/large?v=v2&amp;amp;px=999" role="button" title="36190.png" alt="36190.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36191.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36203i8401F07981AE257A/image-size/large?v=v2&amp;amp;px=999" role="button" title="36191.png" alt="36191.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Please let me know if it solves your query. Once you get the unique values you can perhaps iterate to find the duplicate ones by comparing this against the unique set of values.</description>
    <pubDate>Tue, 30 Nov 2021 14:38:33 GMT</pubDate>
    <dc:creator>devneetmohanty07</dc:creator>
    <dc:date>2021-11-30T14:38:33Z</dc:date>
    <item>
      <title>Filter Unique Values Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99452#M47002</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a collection containing 500 rows from which i wish to filter/sort/identify all duplicates based on values in one of the columns and move those duplicates to a separate collection.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I believe this might be achieveable using the 'Filter Collection' action, or perhaps a code stage, however I am unaware of what syntax to use.&lt;BR /&gt;&lt;BR /&gt;Any help would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Br,&lt;BR /&gt;Sebastian</description>
      <pubDate>Tue, 30 Nov 2021 13:34:52 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99452#M47002</guid>
      <dc:creator>SebT</dc:creator>
      <dc:date>2021-11-30T13:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Unique Values Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99453#M47003</link>
      <description>Hi Sebastian,&lt;BR /&gt;&lt;BR /&gt;You can utilize this &lt;A href="https://digitalexchange.blueprism.com/dx/entry/35840/solution/millicon---collection-utility" target="_blank" rel="noopener"&gt;VBO&lt;/A&gt; from DX.&lt;BR /&gt;Use Action Distinct to get Unique Values.&lt;BR /&gt;Use Not in Operator Action to get Duplicate values. Pass Unique value collection as Input collection</description>
      <pubDate>Tue, 30 Nov 2021 13:45:14 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99453#M47003</guid>
      <dc:creator>vinodchinthakin</dc:creator>
      <dc:date>2021-11-30T13:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Unique Values Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99454#M47004</link>
      <description>Hi Seb T,&lt;BR /&gt;&lt;BR /&gt;The fastest way to filter out unique values is to extend the Collection Manipulation VBO and you can add a new action named "Keep Unique Values". Pass one collection as an input parameter and pass another collection as an output parameter and use the below code in the code stage:&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Output_Collection = Input_Collection.DefaultView.ToTable(True)&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;Please find the below solution for your reference:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36184.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36194iD555B38371C98592/image-size/large?v=v2&amp;amp;px=999" role="button" title="36184.png" alt="36184.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36185.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36195i091E04EBF7EA9905/image-size/large?v=v2&amp;amp;px=999" role="button" title="36185.png" alt="36185.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36186.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36197i7049588498E9D743/image-size/large?v=v2&amp;amp;px=999" role="button" title="36186.png" alt="36186.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36187.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36198iA18242B94A990B5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="36187.png" alt="36187.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 30 Nov 2021 13:50:41 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99454#M47004</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2021-11-30T13:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Unique Values Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99455#M47005</link>
      <description>Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1843"&gt;@devneetmohanty07&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you for your answer. However, what I am trying to achieve is to get a collection containing only the duplicated values - not the unique values.</description>
      <pubDate>Tue, 30 Nov 2021 14:03:58 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99455#M47005</guid>
      <dc:creator>SebT</dc:creator>
      <dc:date>2021-11-30T14:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Unique Values Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99456#M47006</link>
      <description>I am really sorry that I misunderstood the question a bit. Yes you were absolutely right, the solution I provided you gives you unique values based on all the fields not only one. I have modified my solution a bit for your requirement. Please find the updated solution as shown below:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pass one collection as an input parameter along with a text data item parameter called "Field Name" and pass another collection as an output parameter and use the below code in the code stage:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Output_Collection = Input_Collection.DefaultView.ToTable(True,Field_Name)&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36188.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36201i5B4A027BF76BCD93/image-size/large?v=v2&amp;amp;px=999" role="button" title="36188.png" alt="36188.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36189.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36199iA4769F77F1F3D352/image-size/large?v=v2&amp;amp;px=999" role="button" title="36189.png" alt="36189.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36190.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36200i39AB44E926B51846/image-size/large?v=v2&amp;amp;px=999" role="button" title="36190.png" alt="36190.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36191.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36203i8401F07981AE257A/image-size/large?v=v2&amp;amp;px=999" role="button" title="36191.png" alt="36191.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Please let me know if it solves your query. Once you get the unique values you can perhaps iterate to find the duplicate ones by comparing this against the unique set of values.</description>
      <pubDate>Tue, 30 Nov 2021 14:38:33 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99456#M47006</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2021-11-30T14:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Unique Values Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99457#M47007</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1843"&gt;@devneetmohanty07&lt;/a&gt; &lt;A class="user-content-mention" data-sign="@" data-contactkey="cdcbb58e-c324-4e05-b305-48fb798e17be" data-tag-text="@vinod chinthakindi" href="https://community.blueprism.com/network/profile?UserKey=cdcbb58e-c324-4e05-b305-48fb798e17be" data-itemmentionkey="6070de82-9619-41c2-808c-29c63bc1e039"&gt;@vinod chinthakindi&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I might have phrased my question wrong. What I need is a collection containing all duplicated values that exists within a single collection.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As an example, lets say I have the following collection with the following values. What I would like to have is a filter/code stage that would move or copy the values 1 &amp;amp; 3 (since they are duplicates) to a separate collection. Hope this makes sense.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36192.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36202i522E40E49BA78426/image-size/large?v=v2&amp;amp;px=999" role="button" title="36192.png" alt="36192.png" /&gt;&lt;/span&gt;&lt;BR /&gt;​​</description>
      <pubDate>Tue, 30 Nov 2021 14:57:11 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99457#M47007</guid>
      <dc:creator>SebT</dc:creator>
      <dc:date>2021-11-30T14:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Unique Values Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99458#M47008</link>
      <description>Hi Seb,&lt;BR /&gt;&lt;BR /&gt;We got confused there for a while probably from the heading of the post. However, knowing your requirement I have come up with a different approach altogether where we can use a LINQ object to get the duplicate records. You can create a new business object and add the below External References ('S&lt;STRONG&gt;ystem.Data.DataSetExtensions.dll&lt;/STRONG&gt;', '&lt;STRONG&gt;System.Core.dll&lt;/STRONG&gt;') and Namespace Imports ('&lt;STRONG&gt;System.Data.DataSetExtensions&lt;/STRONG&gt;', '&lt;STRONG&gt;System.LINQ&lt;/STRONG&gt;') on the Page Description stage of your Initialize action for the LINQ queries to work properly. Also, ensure that the language is selected as '&lt;STRONG&gt;Visual Basic&lt;/STRONG&gt;':&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36193.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36206i2B5A36794F2E96D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="36193.png" alt="36193.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Once you have the updated code options as shown above, create a new action named '&lt;STRONG&gt;Get Duplicate Records&lt;/STRONG&gt;' and pass two input arguments, Input Collection (Collection) and Field Name (Text). Based on the field name that you provide the duplicate records will be fetched from the Input Collection. Also set an Output parameter as Output Collection (Collection) for this action as shown below:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36194.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36207iBA41DBF170B37748/image-size/large?v=v2&amp;amp;px=999" role="button" title="36194.png" alt="36194.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Add the code stage and use the below code with the input and out arguments as show:&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Output_Collection = (From row In Input_Collection _&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;Group row By a = row(Field_Name).Trim.ToString Into grp = Group _&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;Where grp.Count&amp;gt;1 _&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;Select grp.ToList).SelectMany(Function(x) x).CopyToDataTable()&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36195.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36205iE08369A67BA13C56/image-size/large?v=v2&amp;amp;px=999" role="button" title="36195.png" alt="36195.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36196.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36204iF30C3274DCD884FC/image-size/large?v=v2&amp;amp;px=999" role="button" title="36196.png" alt="36196.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36197.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36210i52F8A7077D464615/image-size/large?v=v2&amp;amp;px=999" role="button" title="36197.png" alt="36197.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;The run results are as follows:&lt;BR /&gt;&lt;BR /&gt;Input Arguments:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36198.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36208iD4500A70441C3269/image-size/large?v=v2&amp;amp;px=999" role="button" title="36198.png" alt="36198.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Output Result:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36199.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36209i01F219E29A95BBFD/image-size/large?v=v2&amp;amp;px=999" role="button" title="36199.png" alt="36199.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You can publish the action and test the same from Process Studio. Let us know if this helps you out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 01 Dec 2021 01:41:47 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99458#M47008</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2021-12-01T01:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Unique Values Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99459#M47009</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1843"&gt;@devneetmohanty07&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Works like a charm! Thank you very much for your help and thorough explanation!</description>
      <pubDate>Wed, 01 Dec 2021 08:58:31 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-Unique-Values-Collection/m-p/99459#M47009</guid>
      <dc:creator>SebT</dc:creator>
      <dc:date>2021-12-01T08:58:31Z</dc:date>
    </item>
  </channel>
</rss>

