<?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 Find Any Value inside a collection to return row and column Index in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Find-Any-Value-inside-a-collection-to-return-row-and-column/m-p/82203#M33668</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Problem Statement&lt;/STRONG&gt;: If a Collection has Columns named as "Name", "Age" and "Sex" , and it has multiple rows, You want the find the value "Vivek", but you don't know where is it present or which column it may be present, just use this VBO and it will give you an output in the below format.&lt;/P&gt;
&lt;P&gt;Column Name, rowindex, columnindex&lt;/P&gt;
&lt;P&gt;Name, 1,1&lt;/P&gt;
&lt;P&gt;Name,4,1&lt;/P&gt;
&lt;P&gt;Which translates into the keyword "Vivek" being present in column named as&amp;nbsp; "Name" and is present in 1st row of 1st column and is also present in 4th row of 1st column&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Solution:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A data-url="https://rpatools.com/2019/05/blue-prism-find-any-value-inside-a-collection/" class="embedly-content" href="https://rpatools.com/2019/05/blue-prism-find-any-value-inside-a-collection/" target="_blank" rel="noopener"&gt;Blue Prism : Find Any Value inside a collection to return row and column Inex - RPA Tools&lt;/A&gt;&lt;A href="https://rpatools.com/2019/05/blue-prism-find-any-value-inside-a-collection/" target="_blank" rel="noopener"&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://rpatools.com/2019/05/blue-prism-find-any-value-inside-a-collection/" target="_blank" rel="noopener"&gt;&lt;BR /&gt;&lt;/A&gt;VBO ATTACHED&lt;A href="https://rpatools.com/2019/05/blue-prism-find-any-value-inside-a-collection/" target="_blank" rel="noopener"&gt;&lt;BR /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Vivek Goel&lt;BR /&gt;RPA Architect&lt;BR /&gt;Asia/Singapore&lt;BR /&gt;+6594554364&lt;BR /&gt;&lt;A href="https://www.rpatools.com/" target="test_blank"&gt;https://www.rpatools.com/&lt;/A&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Sat, 23 Nov 2019 08:44:00 GMT</pubDate>
    <dc:creator>vivek.kumar.goel</dc:creator>
    <dc:date>2019-11-23T08:44:00Z</dc:date>
    <item>
      <title>Find Any Value inside a collection to return row and column Index</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Find-Any-Value-inside-a-collection-to-return-row-and-column/m-p/82203#M33668</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Problem Statement&lt;/STRONG&gt;: If a Collection has Columns named as "Name", "Age" and "Sex" , and it has multiple rows, You want the find the value "Vivek", but you don't know where is it present or which column it may be present, just use this VBO and it will give you an output in the below format.&lt;/P&gt;
&lt;P&gt;Column Name, rowindex, columnindex&lt;/P&gt;
&lt;P&gt;Name, 1,1&lt;/P&gt;
&lt;P&gt;Name,4,1&lt;/P&gt;
&lt;P&gt;Which translates into the keyword "Vivek" being present in column named as&amp;nbsp; "Name" and is present in 1st row of 1st column and is also present in 4th row of 1st column&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Solution:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A data-url="https://rpatools.com/2019/05/blue-prism-find-any-value-inside-a-collection/" class="embedly-content" href="https://rpatools.com/2019/05/blue-prism-find-any-value-inside-a-collection/" target="_blank" rel="noopener"&gt;Blue Prism : Find Any Value inside a collection to return row and column Inex - RPA Tools&lt;/A&gt;&lt;A href="https://rpatools.com/2019/05/blue-prism-find-any-value-inside-a-collection/" target="_blank" rel="noopener"&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://rpatools.com/2019/05/blue-prism-find-any-value-inside-a-collection/" target="_blank" rel="noopener"&gt;&lt;BR /&gt;&lt;/A&gt;VBO ATTACHED&lt;A href="https://rpatools.com/2019/05/blue-prism-find-any-value-inside-a-collection/" target="_blank" rel="noopener"&gt;&lt;BR /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Vivek Goel&lt;BR /&gt;RPA Architect&lt;BR /&gt;Asia/Singapore&lt;BR /&gt;+6594554364&lt;BR /&gt;&lt;A href="https://www.rpatools.com/" target="test_blank"&gt;https://www.rpatools.com/&lt;/A&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sat, 23 Nov 2019 08:44:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Find-Any-Value-inside-a-collection-to-return-row-and-column/m-p/82203#M33668</guid>
      <dc:creator>vivek.kumar.goel</dc:creator>
      <dc:date>2019-11-23T08:44:00Z</dc:date>
    </item>
    <item>
      <title>RE: Find Any Value inside a collection to return row and column Index</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Find-Any-Value-inside-a-collection-to-return-row-and-column/m-p/82204#M33669</link>
      <description>Hi Vivek,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Nice work, here's a bit of basic code I use as well when indexing in collections, where &lt;EM&gt;DT is the Collection to check, valuetofind is the desired value&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;DT = new DataTable();&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DT = new DataTable();&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DT.Columns.Add("Column Name");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DT.Columns.Add("RowIndex");DT.Columns.Add("ColumnIndex");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;int rowindex=0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;int columnindex=1;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;foreach (DataColumn Column in in_DT.Columns) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{ &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DataRow[] rows = in_DT.Select(Column.ColumnName+" Like '%"+valuetofind+"%'"); &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;if (rows.Length&amp;gt;0) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{ foreach (DataRow row in rows) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{ &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;rowindex = in_DT.Rows.IndexOf(row)+1; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DataRow dr = DT.NewRow(); dr["Column Name"]=Column.ColumnName; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;dr["RowIndex"]=rowindex; dr["ColumnIndex"]=columnindex;&lt;BR /&gt; DT.Rows.Add(dr); &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;} &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;} else {rowindex = 0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;} columnindex=columnindex+1; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;James McLintock&lt;BR /&gt;Process Analyst and Developer&lt;BR /&gt;Blue Prism&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Jul 2020 09:04:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Find-Any-Value-inside-a-collection-to-return-row-and-column/m-p/82204#M33669</guid>
      <dc:creator>JamesMcLintock</dc:creator>
      <dc:date>2020-07-15T09:04:00Z</dc:date>
    </item>
  </channel>
</rss>

