<?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: Get Unique Values from more than one column in a collection in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77506#M29710</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Can you try below code in Code stage:&lt;BR /&gt;&lt;BR /&gt;Collection_Out=Collection_In.DefaultView.ToTable(True)&lt;BR /&gt;&lt;BR /&gt;Input : Collection_In&lt;BR /&gt;Output: Collection_Out&lt;BR /&gt;&lt;BR /&gt;Language : Visual Basic&lt;BR /&gt;No additional namespaces required&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Joshna Dammala&lt;BR /&gt;Project Engineer&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Thu, 07 Jul 2022 06:30:00 GMT</pubDate>
    <dc:creator>Joshna_16</dc:creator>
    <dc:date>2022-07-07T06:30:00Z</dc:date>
    <item>
      <title>Get Unique Values from more than one column in a collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77499#M29703</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I have a scenario where I have to get unique values from more than one column in a collection. Right now I am achieving this using loops which is taking more execution time due to high number of records. I am looking for a using code stage to achieve similar thing or any other method with less execution time.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Input Collection&lt;/STRONG&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&amp;nbsp;&amp;nbsp;&amp;nbsp; Email&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mobile&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="mailto:A@GMAIL.COM" target="_blank" rel="noopener"&gt;A@GMAIL.COM&lt;/A&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 91****&lt;/P&gt;
&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="mailto:B@GMAIL.COM" target="_blank" rel="noopener"&gt;B@GMAIL.COM&lt;/A&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 91****&lt;/P&gt;
&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="mailto:C@GMAIL.COM" target="_blank" rel="noopener"&gt;C@GMAIL.COM&lt;/A&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 91****&lt;/P&gt;
&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="mailto:A@GMAIL.COM" target="_blank" rel="noopener"&gt;A@GMAIL.COM&lt;/A&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 91****&lt;/P&gt;
&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="mailto:B@GMAIL.COM" target="_blank" rel="noopener"&gt;B@GMAIL.COM&lt;/A&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 91****&lt;/P&gt;
&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="mailto:D@GMAIL.COM" target="_blank" rel="noopener"&gt;D@GMAIL.COM&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 91****&lt;/P&gt;
&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;Expected Output Collection:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp; Email&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A@GMAIL.COM&lt;/P&gt;
&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B@GMAIL.COM&lt;/P&gt;
&lt;P&gt;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C@GMAIL.COM&lt;/P&gt;
&lt;P&gt;D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D@GMAIL.COM&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
Edit:&lt;BR /&gt;Input collection can also has some Null Values in Email Column&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;vinod chinthakindi&lt;BR /&gt;------------------------------</description>
      <pubDate>Wed, 22 Jun 2022 07:02:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77499#M29703</guid>
      <dc:creator>vinodchinthakin</dc:creator>
      <dc:date>2022-06-22T07:02:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get Unique Values from more than one column in a collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77500#M29704</link>
      <description>Hey &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="5ce295ba-5977-4cfe-aec3-76ac468b4de4"&gt;@vinod chinthakindi&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;You can try the below code for removing duplicates - but ​always keep in mind, that whether it is C# code or any other programming language, it will always perform the loop function (for each). you can set the values accordingly as per your table name.&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="lang-cs s-code-block"&gt;&lt;CODE class="hljs language-csharp"&gt;&lt;SPAN class="hljs-function"&gt;&lt;SPAN class="hljs-keyword"&gt;public&lt;/SPAN&gt; DataTable &lt;SPAN class="hljs-title"&gt;RemoveDuplicateRows&lt;/SPAN&gt;(&lt;SPAN class="hljs-params"&gt;DataTable dTable, &lt;SPAN class="hljs-built_in"&gt;string&lt;/SPAN&gt; colName&lt;/SPAN&gt;)&lt;/SPAN&gt;
{
   Hashtable hTable = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; Hashtable();
   ArrayList duplicateList = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; ArrayList();

   &lt;SPAN class="hljs-comment"&gt;//Add list of all the unique item value to hashtable, which stores combination of key, value pair.&lt;/SPAN&gt;
   &lt;SPAN class="hljs-comment"&gt;//And add duplicate item value in arraylist.&lt;/SPAN&gt;
   &lt;SPAN class="hljs-keyword"&gt;foreach&lt;/SPAN&gt; (DataRow drow &lt;SPAN class="hljs-keyword"&gt;in&lt;/SPAN&gt; dTable.Rows)
   {
      &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (hTable.Contains(drow[colName]))
         duplicateList.Add(drow);
      &lt;SPAN class="hljs-keyword"&gt;else&lt;/SPAN&gt;
         hTable.Add(drow[colName], &lt;SPAN class="hljs-built_in"&gt;string&lt;/SPAN&gt;.Empty); 
   }

   &lt;SPAN class="hljs-comment"&gt;//Removing a list of duplicate items from datatable.&lt;/SPAN&gt;
   &lt;SPAN class="hljs-keyword"&gt;foreach&lt;/SPAN&gt; (DataRow dRow &lt;SPAN class="hljs-keyword"&gt;in&lt;/SPAN&gt; duplicateList)
      dTable.Rows.Remove(dRow);

   &lt;SPAN class="hljs-comment"&gt;//Datatable which contains unique records will be return as output.&lt;/SPAN&gt;
      &lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt; dTable;
}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;Thanks &amp;amp; Regards&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Rushabh Dedhia&lt;BR /&gt;Founder,&lt;BR /&gt;Biznessology (https://www.linkedin.com/company/biznessology/)&lt;BR /&gt;+91 9428860307&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Jun 2022 08:30:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77500#M29704</guid>
      <dc:creator>RushabhDedhia</dc:creator>
      <dc:date>2022-06-22T08:30:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get Unique Values from more than one column in a collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77501#M29705</link>
      <description>&lt;SPAN&gt;Hi Vinod,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can extend the '&lt;STRONG&gt;Collection Manipulation&lt;/STRONG&gt;' business object and add the &lt;/SPAN&gt;&lt;SPAN&gt;Namespace Imports: '&lt;STRONG&gt;System.Collections.Generic&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&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;/SPAN&gt;&lt;STRONG&gt;Visual Basic&lt;/STRONG&gt;&lt;SPAN&gt;'.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Once you have the updated code options as shown above, create a new action named '&lt;/SPAN&gt;&lt;STRONG&gt;Get Unique Values&lt;/STRONG&gt;&lt;SPAN&gt;' and pass two input arguments, '&lt;STRONG&gt;Input Collection'&lt;/STRONG&gt; (Collection) and '&lt;STRONG&gt;Field Names'&lt;/STRONG&gt; (Collection) having a single column called '&lt;STRONG&gt;Fields&lt;/STRONG&gt;' of text data type. Based on the field name in each row of the Field Names collection unique rows will be fetched from the Input Collection. Also set an Output parameter as '&lt;STRONG&gt;Output Collection'&lt;/STRONG&gt; (Collection) for this action as shown below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28062.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28195i5A6738D828441F03/image-size/large?v=v2&amp;amp;px=999" role="button" title="28062.png" alt="28062.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Add the code stage and use the below code with the input and out arguments as show:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-vbnet"&gt;&lt;CODE&gt;Dim listOfFields = New List(Of String)()

For Each row In Field_Names.Rows

	listOfFields.Add(row("Fields").ToString())

Next

Output_Collection = Input_Collection.DefaultView.ToTable(True,listOfFields.ToArray())&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28063.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28193i8B507C562D4D68E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="28063.png" alt="28063.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28064.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28191i02ED70C7D5236FF4/image-size/large?v=v2&amp;amp;px=999" role="button" title="28064.png" alt="28064.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28065.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28197iA4F25C3F58DADE1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="28065.png" alt="28065.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The run results are as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Input Arguments:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28066.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28196iB8E64458E0BD2747/image-size/large?v=v2&amp;amp;px=999" role="button" title="28066.png" alt="28066.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28067.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28194i4FF053BEAF88456E/image-size/large?v=v2&amp;amp;px=999" role="button" title="28067.png" alt="28067.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Output Result:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28068.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28201iA8D27C986BA53A3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="28068.png" alt="28068.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&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;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;----------------------------------&lt;BR /&gt;Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Devneet Mohanty&lt;BR /&gt;Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,&lt;BR /&gt;WonderBotz India Pvt. Ltd.&lt;BR /&gt;Blue Prism Community MVP | Blue Prism 7x Certified Professional&lt;BR /&gt;Website: &lt;A href="https://devneet.github.io/" target="test_blank"&gt;https://devneet.github.io/&lt;/A&gt;&lt;BR /&gt;Email: devneetmohanty07@gmail.com&lt;BR /&gt;&lt;BR /&gt;----------------------------------&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Jun 2022 08:42:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77501#M29705</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2022-06-22T08:42:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get Unique Values from more than one column in a collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77502#M29706</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;I tried your code but got an error saying "row is not declared".​&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;add the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Namespace Imports: '&lt;STRONG&gt;System.Collections.Generic&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;' and added System.Linq.dll .with the language is selected as '&lt;/SPAN&gt;&lt;STRONG&gt;Visual Basic&lt;/STRONG&gt;&lt;SPAN&gt;'.&lt;BR /&gt;&lt;/SPAN&gt;Am I missing any specific dll for the above code?​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;vinod chinthakindi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Jun 2022 10:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77502#M29706</guid>
      <dc:creator>vinodchinthakin</dc:creator>
      <dc:date>2022-06-23T10:01:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get Unique Values from more than one column in a collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77503#M29707</link>
      <description>Hi Vinod,&lt;BR /&gt;&lt;BR /&gt;You dont even require the LINQ dll for this. This only needs the namespace import '&lt;STRONG&gt;System.Collections.Generic&lt;/STRONG&gt;' to be added separately along with the default namespace imports that get generated automatically whenever you create any new business object. You can see the below screenshot for reference:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28081.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28211i90DED4A79760C251/image-size/large?v=v2&amp;amp;px=999" role="button" title="28081.png" alt="28081.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;The error you are getting might be due to the fact that you are not declaring the data type of the row variable in the for each statement. I do not need to do that sine I guess I am on Blue Prism v.6.10.4 which uses an updated .NET runtime environment.&lt;BR /&gt;&lt;BR /&gt;You can try this updated code and check if it works:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;CODE&gt;&lt;SPAN&gt;Dim listOfFields = New List(Of String)()&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;CODE&gt;&lt;SPAN&gt;For Each row &lt;SPAN style="background-color: #ffff00;"&gt;As System.Data.DataRow&lt;/SPAN&gt; In Field_Names.Rows&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;CODE&gt;&lt;SPAN&gt; listOfFields.Add(row("Fields").ToString())&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;CODE&gt;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;CODE&gt;&lt;SPAN&gt;Output_Collection = Input_Collection.DefaultView.ToTable(True,listOfFields.ToArray())&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;Here, I have just added the highlighted section of the code to declare the variable row as a DataRow() class type object.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;----------------------------------&lt;BR /&gt;Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Devneet Mohanty&lt;BR /&gt;Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,&lt;BR /&gt;WonderBotz India Pvt. Ltd.&lt;BR /&gt;Blue Prism Community MVP | Blue Prism 7x Certified Professional&lt;BR /&gt;Website: &lt;A href="https://devneet.github.io/" target="test_blank"&gt;https://devneet.github.io/&lt;/A&gt;&lt;BR /&gt;Email: devneetmohanty07@gmail.com&lt;BR /&gt;&lt;BR /&gt;----------------------------------&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Jun 2022 10:22:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77503#M29707</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2022-06-23T10:22:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get Unique Values from more than one column in a collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77504#M29708</link>
      <description>Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1843"&gt;@devneetmohanty07&lt;/a&gt;&lt;BR /&gt;I am using BP6.4.2, Above changes in code has resolved the compile error. But while execution it throws a following error. Any idea!&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28094.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28223i9B85AC177F98EDF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="28094.png" alt="28094.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;vinod chinthakindi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Jun 2022 10:54:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77504#M29708</guid>
      <dc:creator>vinodchinthakin</dc:creator>
      <dc:date>2022-06-23T10:54:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get Unique Values from more than one column in a collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77505#M29709</link>
      <description>Hi Vinod ,&lt;BR /&gt;&lt;BR /&gt;If you are using the Code stage use the dictionary with key as "Name" or if you want the combination of two columns you can use&lt;BR /&gt;"Id+Name" and you can avoid the duplicates from the output collection . Please find the screenshot for C# code for reference .&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28103.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28233iFE2E280F753C00A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="28103.png" alt="28103.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Satish Gunturi&lt;BR /&gt;Senior Consultant&lt;BR /&gt;Ignite IPA Pvt Ltd&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Satish Gunturi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Jul 2022 13:03:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77505#M29709</guid>
      <dc:creator>Satish1414</dc:creator>
      <dc:date>2022-07-06T13:03:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get Unique Values from more than one column in a collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77506#M29710</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Can you try below code in Code stage:&lt;BR /&gt;&lt;BR /&gt;Collection_Out=Collection_In.DefaultView.ToTable(True)&lt;BR /&gt;&lt;BR /&gt;Input : Collection_In&lt;BR /&gt;Output: Collection_Out&lt;BR /&gt;&lt;BR /&gt;Language : Visual Basic&lt;BR /&gt;No additional namespaces required&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Joshna Dammala&lt;BR /&gt;Project Engineer&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jul 2022 06:30:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77506#M29710</guid>
      <dc:creator>Joshna_16</dc:creator>
      <dc:date>2022-07-07T06:30:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get Unique Values from more than one column in a collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77507#M29711</link>
      <description>I think, DefaultView.ToTable(True) will not work when using a collection inside a collection (a nested collection).&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Jörg Kalkmann&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Oct 2022 15:44:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-Unique-Values-from-more-than-one-column-in-a-collection/m-p/77507#M29711</guid>
      <dc:creator>joergkalkmann</dc:creator>
      <dc:date>2022-10-17T15:44:00Z</dc:date>
    </item>
  </channel>
</rss>

