<?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: Combining Collections in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63208#M16183</link>
    <description>Thanks Ami.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Jonathan Holstine&lt;BR /&gt;Systems Accountant&lt;BR /&gt;Interior Business Center&lt;BR /&gt;America/Denver&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Tue, 17 Sep 2019 13:34:00 GMT</pubDate>
    <dc:creator>JonathanHolstin</dc:creator>
    <dc:date>2019-09-17T13:34:00Z</dc:date>
    <item>
      <title>Combining Collections</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63206#M16181</link>
      <description>I have two collections that I need combined and added to a queue.&amp;nbsp; What is the best approach to do this?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1)&amp;nbsp; Combine the collections into one new collection and then add to queue?&amp;nbsp; If so does someone have an example or guidance on this?&lt;BR /&gt;2)&amp;nbsp; Is there a way to add to queue without first combining into a new collection?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Jonathan Holstine&lt;BR /&gt;Systems Accountant&lt;BR /&gt;Interior Business Center&lt;BR /&gt;America/Denver&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Sep 2019 16:13:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63206#M16181</guid>
      <dc:creator>JonathanHolstin</dc:creator>
      <dc:date>2019-09-10T16:13:00Z</dc:date>
    </item>
    <item>
      <title>RE: Combining Collections</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63207#M16182</link>
      <description>&lt;P&gt;I suppose it depends on the content, and how you want to combine.&lt;BR /&gt;&lt;BR /&gt;Are the columns the same? If so, Utility - Collection Manipulation has an action called Append Rows to Collection. If the columns are different, you could instead use the Merge Collection action. If you're looking for something more like a join statement, here's a C# stage that'll do a Left Outer Join.&lt;BR /&gt;&lt;BR /&gt;Inputs:&lt;BR /&gt;Left Collection - Collection&lt;BR /&gt;Right Collection - Collection&lt;BR /&gt;Key Field - Text&lt;/P&gt;
&lt;P&gt;Outputs:&lt;BR /&gt;Collection Out - Collection&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="language-csharp"&gt;&lt;SPAN class="token comment" spellcheck="true"&gt;// Build the Collection_Out columns and validate Key_Field is in both collections.&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;!&lt;/SPAN&gt;Left_Collection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Contains&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Key_Field&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;throw&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Exception&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Left Collection does not contain key field '"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt; Key_Field &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"'."&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;!&lt;/SPAN&gt;Right_Collection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Contains&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Key_Field&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;throw&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Exception&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Right Collection does not contain key field '"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt; Key_Field &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"'."&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;

DataTable temp &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;DataTable&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="token keyword"&gt;foreach&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;DataColumn Column &lt;SPAN class="token keyword"&gt;in&lt;/SPAN&gt; Left_Collection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
	temp&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Column&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Column&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataType&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="token keyword"&gt;foreach&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;DataColumn Column &lt;SPAN class="token keyword"&gt;in&lt;/SPAN&gt; Right_Collection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Column&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName &lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt; Key_Field&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
	&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
		&lt;SPAN class="token comment" spellcheck="true"&gt;// Do Nothing&lt;/SPAN&gt;
	&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;temp&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Contains&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Column&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
	&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
		&lt;SPAN class="token keyword"&gt;throw&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Exception&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Collections contain non-key duplicate field ('"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt; Column&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"')."&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt;
		temp&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Column&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Column&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataType&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="token comment" spellcheck="true"&gt;// Cycle through the left collection and add any associated information from the right collection.&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;foreach&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;DataRow OuterRow &lt;SPAN class="token keyword"&gt;in&lt;/SPAN&gt; Left_Collection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Rows&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
	DataRow&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; MatchingRows &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; Right_Collection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Select&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"["&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt; Key_Field &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"] = '"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt; OuterRow&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;Key_Field&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"'"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;MatchingRows&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Length &lt;SPAN class="token operator"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
	&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
		&lt;SPAN class="token keyword"&gt;foreach&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;DataRow Match &lt;SPAN class="token keyword"&gt;in&lt;/SPAN&gt; MatchingRows&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
		&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
			DataRow New_Row &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; temp&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;NewRow&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
			&lt;SPAN class="token keyword"&gt;foreach&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;DataColumn dColumn &lt;SPAN class="token keyword"&gt;in&lt;/SPAN&gt; Left_Collection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
			&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
				New_Row&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;dColumn&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; OuterRow&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;dColumn&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
			&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
			&lt;SPAN class="token keyword"&gt;foreach&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;DataColumn dColumn &lt;SPAN class="token keyword"&gt;in&lt;/SPAN&gt; Right_Collection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
			&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
				New_Row&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;dColumn&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; Match&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;dColumn&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
			&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
			temp&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Rows&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;New_Row&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
		&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
	&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt;
	&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
		&lt;SPAN class="token comment" spellcheck="true"&gt;// No matching rows, but since it's an outer join, append the left row.&lt;/SPAN&gt;
		DataRow New_Row &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; temp&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;NewRow&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
		&lt;SPAN class="token keyword"&gt;foreach&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;DataColumn dColumn &lt;SPAN class="token keyword"&gt;in&lt;/SPAN&gt; Left_Collection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
		&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
			New_Row&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;dColumn&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; OuterRow&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;dColumn&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
		&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
		temp&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Rows&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;New_Row&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
Collection_Out &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; temp&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;On the other hand, if you're looking to add a column to an existing collection of type Collection, this stage may interest you.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Inputs: &lt;BR /&gt;Collection - Collection&lt;BR /&gt;colName - Text&lt;BR /&gt;colType - Text&lt;/P&gt;
&lt;P&gt;Outputs:&lt;BR /&gt;New Collection - Collection&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="language-csharp"&gt;DataColumn col &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;DataColumn&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Number"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
col&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataType &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; System&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Type&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetType&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"System.Int32"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Text"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;||&lt;/SPAN&gt; colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Password"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
	col&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataType &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; System&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Type&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetType&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"System.String"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Collection"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
	col&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataType &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;typeof&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;DataTable&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Date"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;||&lt;/SPAN&gt; colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"DateTime"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;||&lt;/SPAN&gt;colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Time"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
	col&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataType &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; System&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Type&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetType&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"System.DateTime"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Flag"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
	col&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataType &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; System&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Type&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetType&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"System.Boolean"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"TimeSpan"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
	col&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataType &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; System&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Type&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetType&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"System.TimeSpan"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Image"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
	col&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataType &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;typeof&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Bitmap&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;else&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;colType&lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Binary"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;
	col&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataType &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; System&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Type&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetType&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"System.Byte[]"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;


col&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; colName&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
Collection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;col&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;	

New_Collection &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; Collection&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ami Barrett&lt;BR /&gt;Lead RPA Software Developer&lt;BR /&gt;Solai &amp;amp; Cameron&lt;BR /&gt;America/Chicago&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Sep 2019 17:53:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63207#M16182</guid>
      <dc:creator>AmiBarrett</dc:creator>
      <dc:date>2019-09-10T17:53:00Z</dc:date>
    </item>
    <item>
      <title>RE: Combining Collections</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63208#M16183</link>
      <description>Thanks Ami.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Jonathan Holstine&lt;BR /&gt;Systems Accountant&lt;BR /&gt;Interior Business Center&lt;BR /&gt;America/Denver&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Sep 2019 13:34:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63208#M16183</guid>
      <dc:creator>JonathanHolstin</dc:creator>
      <dc:date>2019-09-17T13:34:00Z</dc:date>
    </item>
    <item>
      <title>RE: Combining Collections</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63209#M16184</link>
      <description>&lt;P&gt;This solution is amazing, &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/33683"&gt;@AmiBarrett&lt;/a&gt;​ !&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I was looking for a way to simulate a typical Left Outer Join like we do it inside SQL. Blue Prism Collection Manipulation VBO does not have this kind of advanced actions.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Your solution is a real proof of your high code understanding level, a clear solver mind and an efficient use of resources.&lt;BR /&gt;&lt;BR /&gt;Of course I am going to use this in my future solutions. I already tested inside an action stage of an object and worked perfectly.&lt;BR /&gt;&lt;BR /&gt;Replicating this for Join function was easy taking care of your commends.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;RaÃºl HernÃ¡ndez&lt;BR /&gt;RPA Developer&lt;BR /&gt;Millicom&lt;BR /&gt;America/El_Salvador&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Dec 2019 20:12:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63209#M16184</guid>
      <dc:creator>RaúlHernández</dc:creator>
      <dc:date>2019-12-26T20:12:00Z</dc:date>
    </item>
    <item>
      <title>RE: Combining Collections</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63210#M16185</link>
      <description>Loved it, thank you!!&lt;BR /&gt;&lt;BR /&gt;I translated it to VB as my object is using that.&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-markup"&gt;'Build the Collection_Out columns and validate Key_Field is in both collections.
If Not Left_Collection.Columns.Contains(Key_Field) Then
	throw new ApplicationException("Left Collection does not contain key field '" + Key_Field + "'.")
else If Not Right_Collection.Columns.Contains(Key_Field) Then
	throw new ApplicationException("Right Collection does not contain key field '" + Key_Field + "'.")
End if

Dim temp as New DataTable

for each Column as DataColumn in Left_Collection.Columns
	temp.Columns.Add(Column.ColumnName, Column.DataType)
next

for each Column as DataColumn in Right_Collection.Columns
	if Column.ColumnName = Key_Field then
		' Do Nothing
	else if temp.Columns.Contains(Column.ColumnName) then
		throw new ApplicationException("Collections contain non-key duplicate field ('" + Column.ColumnName + "').")
	else
		temp.Columns.Add(Column.ColumnName, Column.DataType)
	end if
next

' Cycle through the left collection and add any associated information from the right collection.
Dim MatchingRows as DataRow()
Dim New_Row as DataRow
for each OuterRow as DataRow in Left_Collection.Rows
	MatchingRows = Right_Collection.Select("[" + Key_Field + "] = '" + OuterRow(Key_Field) + "'")
	if MatchingRows.Length &amp;gt; 0 then
		for each Match as DataRow in MatchingRows
			New_Row = temp.NewRow()
			for each dColumn as DataColumn in Left_Collection.Columns
				New_Row(dColumn.ColumnName) = OuterRow(dColumn.ColumnName)
			next
			for each dColumn as DataColumn in Right_Collection.Columns
				New_Row(dColumn.ColumnName) = Match(dColumn.ColumnName)
			next
			temp.Rows.Add(New_Row)
		next
	else
		'No matching rows, but since it's an outer join, append the left row.
		New_Row = temp.NewRow()
		for each dColumn as DataColumn in Left_Collection.Columns
			New_Row(dColumn.ColumnName) = OuterRow(dColumn.ColumnName)
		next
		temp.Rows.Add(New_Row)
	end if
next
Collection_Out = temp​&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ignacio de la Fuente&lt;BR /&gt;Robotic Process Automation&lt;BR /&gt;Philip Morris international&lt;BR /&gt;America/Argentina/Buenos_Aires&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Mar 2020 21:02:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63210#M16185</guid>
      <dc:creator>Ignaciode_la_Fu</dc:creator>
      <dc:date>2020-03-25T21:02:00Z</dc:date>
    </item>
    <item>
      <title>RE: Combining Collections</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63211#M16186</link>
      <description>Hi Ami,&lt;BR /&gt;&lt;BR /&gt;You left outer join code is awesome. For me its working as expected in c# compiler but not in blue prism code stage. In blue prism its giving me exception - "Could not excute code because &lt;STRONG&gt;Left_Collection.Column1 does not belong to Right_Collection table.&lt;/STRONG&gt; It will be great help if this work in bluprism too.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;pooja pawar&lt;BR /&gt;Softwear Engineer&lt;BR /&gt;accenture&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sat, 19 Sep 2020 11:53:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63211#M16186</guid>
      <dc:creator>poojapawar</dc:creator>
      <dc:date>2020-09-19T11:53:00Z</dc:date>
    </item>
    <item>
      <title>RE: Combining Collections</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63212#M16187</link>
      <description>Just to make sure - is the object you're putting this in also set to c#? The out of the box VBOs we supply are in VB.&lt;BR /&gt;&lt;BR /&gt;Edit: A previous post contains the same stage in VB, if that's more useful.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ami Barrett&lt;BR /&gt;Sr Product Consultant&lt;BR /&gt;Blue Prism&lt;BR /&gt;Plano, TX&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sat, 19 Sep 2020 17:32:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63212#M16187</guid>
      <dc:creator>AmiBarrett</dc:creator>
      <dc:date>2020-09-19T17:32:00Z</dc:date>
    </item>
    <item>
      <title>RE: Combining Collections</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63213#M16188</link>
      <description>I rechecked and its C# only.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;pooja pawar&lt;BR /&gt;Softwear Engineer&lt;BR /&gt;accenture&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Sep 2020 10:32:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63213#M16188</guid>
      <dc:creator>poojapawar</dc:creator>
      <dc:date>2020-09-21T10:32:00Z</dc:date>
    </item>
    <item>
      <title>RE: Combining Collections</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63214#M16189</link>
      <description>Could you post the inputs that you're passing when the error is thrown?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nicholas Zejdlik&lt;BR /&gt;RPA Developer&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Sep 2020 14:20:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63214#M16189</guid>
      <dc:creator>NicholasZejdlik</dc:creator>
      <dc:date>2020-09-21T14:20:00Z</dc:date>
    </item>
    <item>
      <title>RE: Combining Collections</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63215#M16190</link>
      <description>If it works in an external compiler, it sounds like your namespaces and DLL references are missing some items. Try comparing with the Code Options in the original collection manipulation VBO. If it's still missing items, try comparing against the image I'm attaching to this post.
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="26825.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/26955iCF2EF587DFBE8274/image-size/large?v=v2&amp;amp;px=999" role="button" title="26825.png" alt="26825.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ami Barrett&lt;BR /&gt;Sr Product Consultant&lt;BR /&gt;Blue Prism&lt;BR /&gt;Plano, TX&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Sep 2020 14:28:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Combining-Collections/m-p/63215#M16190</guid>
      <dc:creator>AmiBarrett</dc:creator>
      <dc:date>2020-09-21T14:28:00Z</dc:date>
    </item>
  </channel>
</rss>

