<?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: read cell from collection-column as index in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/read-cell-from-collection-column-as-index/m-p/76098#M28650</link>
    <description>&lt;P&gt;Hi Aviad,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are looping through the collection, use [Collection.ColumnName] to get the corresponding value.&lt;BR /&gt;In your example when the the loop is in Agent A, use&amp;nbsp; [Agent.department] in your expression/decision stage to get the corresponding department value.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18277.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/18430i0354544C7127FF38/image-size/large?v=v2&amp;amp;px=999" role="button" title="18277.png" alt="18277.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Collection:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18278.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/18429i9D6690FB2639FA4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="18278.png" alt="18278.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Avinash Ramkumar&lt;BR /&gt;Intelligent Automation Tech Lead&lt;BR /&gt;ASB Bank Limited&lt;BR /&gt;Auckland&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Thu, 18 Nov 2021 20:57:00 GMT</pubDate>
    <dc:creator>AvinashRamkumar</dc:creator>
    <dc:date>2021-11-18T20:57:00Z</dc:date>
    <item>
      <title>read cell from collection-column as index</title>
      <link>https://community.blueprism.com/t5/Product-Forum/read-cell-from-collection-column-as-index/m-p/76097#M28649</link>
      <description>I'm trying to read cell value from a collection. My code runs on Agent field loop, and all I need is to extract horizontally fields. So if the loop is now on Agent A I need to extract the department field. Seems like utility collection manipulation has only Read Collection Field action which works vertically (with row index)...which doesn't really help as I need an action that feeds&amp;nbsp; column name (department) as an index and field name as Agent (just sort of Vlookup)
&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="256" style="border-collapse: collapse; width: 192pt;"&gt;
&lt;TBODY&gt;
&lt;TR height="19" style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl3181" width="64" style="height: 14.5pt; width: 48pt;"&gt;&lt;/TD&gt;
&lt;TD class="xl3182" width="64" style="border-left: none; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD class="xl3182" width="64" style="border-left: none; width: 48pt;"&gt;Age&lt;/TD&gt;
&lt;TD class="xl3182" width="64" style="border-left: none; width: 48pt;"&gt;department&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR height="19" style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl3181" style="height: 14.5pt; border-top: none;"&gt;Agent A&lt;/TD&gt;
&lt;TD class="xl3181" align="right" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;
&lt;TD class="xl3181" align="right" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;
&lt;TD class="xl3181" style="border-top: none; border-left: none;"&gt;sales&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR height="19" style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl3181" style="height: 14.5pt; border-top: none;"&gt;Agent B&lt;/TD&gt;
&lt;TD class="xl3181" align="right" style="border-top: none; border-left: none;"&gt;22&lt;/TD&gt;
&lt;TD class="xl3181" align="right" style="border-top: none; border-left: none;"&gt;25&lt;/TD&gt;
&lt;TD class="xl3181" style="border-top: none; border-left: none;"&gt;analytics&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR height="19" style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl3181" style="height: 14.5pt; border-top: none;"&gt;Agent C&lt;/TD&gt;
&lt;TD class="xl3181" align="right" style="border-top: none; border-left: none;"&gt;33&lt;/TD&gt;
&lt;TD class="xl3181" align="right" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;
&lt;TD class="xl3181" style="border-top: none; border-left: none;"&gt;marketing&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR height="19" style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl3181" style="height: 14.5pt; border-top: none;"&gt;Agent D&lt;/TD&gt;
&lt;TD class="xl3181" align="right" style="border-top: none; border-left: none;"&gt;44&lt;/TD&gt;
&lt;TD class="xl3181" align="right" style="border-top: none; border-left: none;"&gt;45&lt;/TD&gt;
&lt;TD class="xl3181" style="border-top: none; border-left: none;"&gt;back office&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&amp;nbsp;many thanks&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Aviad Ben Zaquen&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Nov 2021 20:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/read-cell-from-collection-column-as-index/m-p/76097#M28649</guid>
      <dc:creator>AviadBen_Zaquen</dc:creator>
      <dc:date>2021-11-18T20:00:00Z</dc:date>
    </item>
    <item>
      <title>RE: read cell from collection-column as index</title>
      <link>https://community.blueprism.com/t5/Product-Forum/read-cell-from-collection-column-as-index/m-p/76098#M28650</link>
      <description>&lt;P&gt;Hi Aviad,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are looping through the collection, use [Collection.ColumnName] to get the corresponding value.&lt;BR /&gt;In your example when the the loop is in Agent A, use&amp;nbsp; [Agent.department] in your expression/decision stage to get the corresponding department value.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18277.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/18430i0354544C7127FF38/image-size/large?v=v2&amp;amp;px=999" role="button" title="18277.png" alt="18277.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Collection:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18278.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/18429i9D6690FB2639FA4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="18278.png" alt="18278.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Avinash Ramkumar&lt;BR /&gt;Intelligent Automation Tech Lead&lt;BR /&gt;ASB Bank Limited&lt;BR /&gt;Auckland&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Nov 2021 20:57:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/read-cell-from-collection-column-as-index/m-p/76098#M28650</guid>
      <dc:creator>AvinashRamkumar</dc:creator>
      <dc:date>2021-11-18T20:57:00Z</dc:date>
    </item>
    <item>
      <title>RE: read cell from collection-column as index</title>
      <link>https://community.blueprism.com/t5/Product-Forum/read-cell-from-collection-column-as-index/m-p/76099#M28651</link>
      <description>&lt;P&gt;Hi Aviad,&lt;BR /&gt;&lt;BR /&gt;If you do not have the field name available with you, you can perhaps extend the Collection Manipulation utility VBO and add a new action there. Set three input parameters along with the associated data items to hold the values, namely Input_Collection, RowIndex and ColumnIndex. Also, use assign a data item as "Value Read" and associate it with a data item and set it as Output Parameter.&lt;BR /&gt;&lt;BR /&gt;Use a code stage with the inputs as Coll. RowIndex and ColumnIndex and map the data items. Also, set the output as Value_Read and map the data item as well&amp;nbsp; with the below code in place:&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;If RowIndex &amp;lt; 0 OrElse Coll.Rows.Count &amp;lt;= RowIndex Then&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;nbsp; &amp;nbsp; Throw New ApplicationException("The supplied row index falls outside of the valid range.")&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;End If&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;If ColumnIndex &amp;lt; 0 OrElse Coll.Columns.Count &amp;lt;= RowIndex Then&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;nbsp; &amp;nbsp; Throw New ApplicationException("The supplied column index falls outside of the valid range.")&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;End If&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Dim col As DataColumn = Coll.Columns(CInt(ColumnIndex))&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;Dim val As String = Coll.Rows(RowIndex)(CInt(ColumnIndex))&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Select Case True&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;Case IsDateColumn(col)&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;nbsp; &amp;nbsp; Value_Read = CDate(val).ToString("d") &lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;Case IsTimeColumn(col)&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;nbsp; &amp;nbsp; Value_Read = CDate(val).ToString("T")&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;Case IsDateTimeColumn(col)&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;nbsp; &amp;nbsp; Value_Read = CDate(val).ToString("G")&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;Case Else&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;nbsp; &amp;nbsp; Value_Read = CStr(val)&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;End Select&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;STRONG&gt;Workflow:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18280.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/18434i7BEE318B70564A2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="18280.png" alt="18280.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;STRONG&gt;Code Stage Properties:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18281.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/18431i2F09C2D0A9EE3765/image-size/large?v=v2&amp;amp;px=999" role="button" title="18281.png" alt="18281.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18282.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/18432iDD4D8721E154FC99/image-size/large?v=v2&amp;amp;px=999" role="button" title="18282.png" alt="18282.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18283.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/18437i56DACEA50FCD0B09/image-size/large?v=v2&amp;amp;px=999" role="button" title="18283.png" alt="18283.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;STRONG&gt;Testing Results:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18284.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/18435iE508C207AE3F8771/image-size/large?v=v2&amp;amp;px=999" role="button" title="18284.png" alt="18284.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18285.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/18436iBC29AD5FC8B30B27/image-size/large?v=v2&amp;amp;px=999" role="button" title="18285.png" alt="18285.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Once tested do clear any initial values set and publish the action and save the VBO to use it from you process studio.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Regards,&lt;BR /&gt;Devneet Mohanty&lt;BR /&gt;Intelligent Automation Consultant&lt;BR /&gt;Blueprism 6x 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;</description>
      <pubDate>Thu, 18 Nov 2021 22:59:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/read-cell-from-collection-column-as-index/m-p/76099#M28651</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2021-11-18T22:59:00Z</dc:date>
    </item>
  </channel>
</rss>

