<?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 set value in different columns in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93905#M43340</link>
    <description>&lt;A class="user-content-mention" data-sign="@" data-contactkey="5faeab35-0374-4327-ba43-d7a303aa8f02" data-tag-text="@Jose Francisco" href="https://community.blueprism.com/network/profile?UserKey=5faeab35-0374-4327-ba43-d7a303aa8f02" data-itemmentionkey="9c2de1e3-c9f6-4bd0-8823-f80d49d12dc2"&gt;@Jose Francisco&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;​Expanding on the reply from &lt;A class="user-content-mention" data-sign="@" data-contactkey="bf6edb31-c42f-4040-9e4b-d47f91046c5a" data-tag-text="@John Carter" href="https://community.blueprism.com/network/profile?UserKey=bf6edb31-c42f-4040-9e4b-d47f91046c5a" data-itemmentionkey="e0b4cdee-6761-4698-ba47-d23eed07f599"&gt;@John Carter&lt;/A&gt;​​, you could always use a few stages to build your filter based on the varying columns in your collection. And it all takes a couple of seconds to run.&lt;BR /&gt;&lt;BR /&gt;
&lt;TABLE width="100%" style="width: 100%;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="width: 60.2863%; vertical-align: top;"&gt;
&lt;OL&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Use the "Get Collection Fields" action in the "Utility - Collection Manipulation" VBO. This will produce a collection (&lt;EM&gt;Fields Collection&lt;/EM&gt;) of the existing field names in the collection.&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Use the "Filter Collection" action in the "Utility - Collection Manipulation" VBO to filter out the fields you want to filter on later into another collection (&lt;EM&gt;CENTR Fields&lt;/EM&gt;). The "Filter" parameter would have the expression:&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;"[Field Name] LIKE 'CENTR*'"&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Use the "Delete Column" action in the "Utility - Collection Manipulation" VBO to delete the "Data Type" field from the "CENTR Fields" collection.&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Use the "Rename Field" action in the "Utility - Collection Manipulation" VBO to rename the "Field Name" field to "Item Value" because that is what the next action expects for a collection.&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Now is the tricky part, using the "Join Text" action in the "Utility - Strings" VBO, we can build out a filter fragment (&lt;EM&gt;Joined Text&lt;/EM&gt;) using all the desired fields in the "CENTR Fields" collection. The "Join Character" parameter would have the expression:&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt; "]='H001' OR ["&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;To finish it off we use the "Filter Collection" action in the "Utility - Collection Manipulation" VBO to filter out all the rows with "Valor A" and "H001" in any of the 90-200 fields in your collection. The "Filter" parameter would have the expression:&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt; "[Material] ='Valor A' AND ([" &amp;amp; Left([Joined Text], Len([Joined Text])-5) &amp;amp; ")"&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/TD&gt;
&lt;TD style="width: 39.6169%;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="24607.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/24742i03E3045F901270F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="24607.png" alt="24607.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Micheal Charron&lt;BR /&gt;Senior Manager&lt;BR /&gt;RBC&lt;BR /&gt;America/Toronto&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Thu, 09 Jun 2022 20:20:00 GMT</pubDate>
    <dc:creator>MichealCharron</dc:creator>
    <dc:date>2022-06-09T20:20:00Z</dc:date>
    <item>
      <title>Filter set value in different columns</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93902#M43337</link>
      <description>&lt;P&gt;Hello masters and mistresses!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I have a problem, well, I have a defined data called "material" and only the value called "center" is in the worksheet, example:&lt;BR /&gt;&lt;BR /&gt;Column C "Material" : "VALUE A", I need to check in column H to Z if it has the center "H001".&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="24615.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/24748i2A19426BF2705AAA/image-size/large?v=v2&amp;amp;px=999" role="button" title="24615.png" alt="24615.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;The problem is that it is taking a long time and the process sometimes falls because the columns are big.&lt;BR /&gt;&lt;BR /&gt;I had seen something related a while ago here in the community but I couldn't find the topic, someone had made available a code in C# or VBO that helps with this issue.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can someone help me?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;José Francisco Bezerra Nunes Júnior&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jun 2022 12:09:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93902#M43337</guid>
      <dc:creator>Jrwork</dc:creator>
      <dc:date>2022-06-09T12:09:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filter set value in different columns</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93903#M43338</link>
      <description>Hi Jose - you can apply a filter to&amp;nbsp; BP collection with the Utility - Collection Manipulation VBO. The filter expression would be something like&lt;BR /&gt;&lt;CODE&gt;[Material]='Valor A' AND ([CENTRO1]='H001' OR [CENTRO2]='H001' OR [CENTRO3]='H001' OR ...etc)&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Carter&lt;BR /&gt;Professional Services&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jun 2022 12:43:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93903#M43338</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2022-06-09T12:43:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filter set value in different columns</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93904#M43339</link>
      <description>&lt;P&gt;Hi John! Thanks!&lt;/P&gt;
&lt;P&gt;but there's only one problem&lt;BR /&gt;the centers are very today the worksheet has 177 columns&lt;BR /&gt;And tomorrow it may have 90 or even 200, the number of columns will always change and I don't know how many columns it will have tomorrow, can you guide me?&lt;BR /&gt;&lt;BR /&gt;it would have to be something that filters according to the informed range, something like that, some code..&lt;/P&gt;
&lt;P&gt;Obs&amp;gt; Sorry for not posting this question in the thread&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;José Francisco Bezerra Nunes Júnior&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jun 2022 14:48:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93904#M43339</guid>
      <dc:creator>Jrwork</dc:creator>
      <dc:date>2022-06-09T14:48:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filter set value in different columns</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93905#M43340</link>
      <description>&lt;A class="user-content-mention" data-sign="@" data-contactkey="5faeab35-0374-4327-ba43-d7a303aa8f02" data-tag-text="@Jose Francisco" href="https://community.blueprism.com/network/profile?UserKey=5faeab35-0374-4327-ba43-d7a303aa8f02" data-itemmentionkey="9c2de1e3-c9f6-4bd0-8823-f80d49d12dc2"&gt;@Jose Francisco&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;​Expanding on the reply from &lt;A class="user-content-mention" data-sign="@" data-contactkey="bf6edb31-c42f-4040-9e4b-d47f91046c5a" data-tag-text="@John Carter" href="https://community.blueprism.com/network/profile?UserKey=bf6edb31-c42f-4040-9e4b-d47f91046c5a" data-itemmentionkey="e0b4cdee-6761-4698-ba47-d23eed07f599"&gt;@John Carter&lt;/A&gt;​​, you could always use a few stages to build your filter based on the varying columns in your collection. And it all takes a couple of seconds to run.&lt;BR /&gt;&lt;BR /&gt;
&lt;TABLE width="100%" style="width: 100%;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="width: 60.2863%; vertical-align: top;"&gt;
&lt;OL&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Use the "Get Collection Fields" action in the "Utility - Collection Manipulation" VBO. This will produce a collection (&lt;EM&gt;Fields Collection&lt;/EM&gt;) of the existing field names in the collection.&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Use the "Filter Collection" action in the "Utility - Collection Manipulation" VBO to filter out the fields you want to filter on later into another collection (&lt;EM&gt;CENTR Fields&lt;/EM&gt;). The "Filter" parameter would have the expression:&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;"[Field Name] LIKE 'CENTR*'"&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Use the "Delete Column" action in the "Utility - Collection Manipulation" VBO to delete the "Data Type" field from the "CENTR Fields" collection.&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Use the "Rename Field" action in the "Utility - Collection Manipulation" VBO to rename the "Field Name" field to "Item Value" because that is what the next action expects for a collection.&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Now is the tricky part, using the "Join Text" action in the "Utility - Strings" VBO, we can build out a filter fragment (&lt;EM&gt;Joined Text&lt;/EM&gt;) using all the desired fields in the "CENTR Fields" collection. The "Join Character" parameter would have the expression:&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt; "]='H001' OR ["&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;To finish it off we use the "Filter Collection" action in the "Utility - Collection Manipulation" VBO to filter out all the rows with "Valor A" and "H001" in any of the 90-200 fields in your collection. The "Filter" parameter would have the expression:&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt; "[Material] ='Valor A' AND ([" &amp;amp; Left([Joined Text], Len([Joined Text])-5) &amp;amp; ")"&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/TD&gt;
&lt;TD style="width: 39.6169%;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="24607.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/24742i03E3045F901270F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="24607.png" alt="24607.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Micheal Charron&lt;BR /&gt;Senior Manager&lt;BR /&gt;RBC&lt;BR /&gt;America/Toronto&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jun 2022 20:20:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93905#M43340</guid>
      <dc:creator>MichealCharron</dc:creator>
      <dc:date>2022-06-09T20:20:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filter set value in different columns</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93906#M43341</link>
      <description>Hi Jose - if you can't predict the columns, then I would try something like Michael's suggestion. Maybe an easier to achieve variant would be to loop through the fields collection and build up a filter statement using a Calc, and then at the end of the loop apply the filter to the data. But Michael's idea looks good too.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Carter&lt;BR /&gt;Professional Services&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Jun 2022 08:21:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93906#M43341</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2022-06-10T08:21:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filter set value in different columns</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93907#M43342</link>
      <description>&lt;P&gt;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/548"&gt;@MichealCharron&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Thank you very much for your explanation and for being very detailed, follow your thank you for your compliment, thank you very much ​&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;José Francisco Bezerra Nunes Júnior&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Jun 2022 12:57:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filter-set-value-in-different-columns/m-p/93907#M43342</guid>
      <dc:creator>Jrwork</dc:creator>
      <dc:date>2022-06-21T12:57:00Z</dc:date>
    </item>
  </channel>
</rss>

