<?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: Rename Collection in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67467#M20072</link>
    <description>&lt;P&gt;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/25418"&gt;@DhirenPatel&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;If the &lt;STRONG&gt;Account Number&lt;/STRONG&gt; and &lt;STRONG&gt;Customer Number&lt;/STRONG&gt; fields always come in at the first and second position, you can use the "Set Column Names From Expected Collection" action in BP's "Utility - Collection Manipulation" VBO. You just use a "Expected Fields/Columns" collection with those two field names (you don't have to list the other field names) and it will rename those two fields.&lt;BR /&gt;&lt;/P&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>Fri, 03 Nov 2023 14:35:00 GMT</pubDate>
    <dc:creator>MichealCharron</dc:creator>
    <dc:date>2023-11-03T14:35:00Z</dc:date>
    <item>
      <title>Rename Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67466#M20071</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Struggling to find an answer to this. I'm hoping someone has experienced and addressed an issue similar to what I'm having - so basically I'm loading a spreadsheet into a collection which is fine, but the issue in trying to resolve is sometimes the headers will change and can be like -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Acc_Num,&lt;/P&gt;
&lt;P&gt;Account_Number&lt;/P&gt;
&lt;P&gt;Ac_Num&lt;/P&gt;
&lt;P&gt;The Customer number can/will be in the same predicament&lt;/P&gt;
&lt;P&gt;I' need these fields to always be Account Number &amp;amp; Customer Number, can anybody suggest the best way to do this?&lt;/P&gt;
&lt;P&gt;I hope this makes sense. Example picture below -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17584.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17737i2EA42FDF05D2C3C1/image-size/large?v=v2&amp;amp;px=999" role="button" title="17584.png" alt="17584.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks in advanced&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Dhiren Patel&lt;BR /&gt;Robotic Process Automation Developer&lt;BR /&gt;Leeds Building Society&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 13:51:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67466#M20071</guid>
      <dc:creator>DhirenPatel</dc:creator>
      <dc:date>2023-11-03T13:51:00Z</dc:date>
    </item>
    <item>
      <title>RE: Rename Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67467#M20072</link>
      <description>&lt;P&gt;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/25418"&gt;@DhirenPatel&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;If the &lt;STRONG&gt;Account Number&lt;/STRONG&gt; and &lt;STRONG&gt;Customer Number&lt;/STRONG&gt; fields always come in at the first and second position, you can use the "Set Column Names From Expected Collection" action in BP's "Utility - Collection Manipulation" VBO. You just use a "Expected Fields/Columns" collection with those two field names (you don't have to list the other field names) and it will rename those two fields.&lt;BR /&gt;&lt;/P&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>Fri, 03 Nov 2023 14:35:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67467#M20072</guid>
      <dc:creator>MichealCharron</dc:creator>
      <dc:date>2023-11-03T14:35:00Z</dc:date>
    </item>
    <item>
      <title>RE: Rename Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67468#M20073</link>
      <description>&lt;P&gt;Hi - thanks for your reply. I wish they did! unfortunately they could be scattered around the input feed!&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Dhiren Patel&lt;BR /&gt;Robotic Process Automation Developer&lt;BR /&gt;Leeds Building Society&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Nov 2023 15:22:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67468#M20073</guid>
      <dc:creator>DhirenPatel</dc:creator>
      <dc:date>2023-11-03T15:22:00Z</dc:date>
    </item>
    <item>
      <title>RE: Rename Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67469#M20074</link>
      <description>&lt;P&gt;Hello, one possibility is to use logic with a list of similar recurrences but it is not very safe, I believe that the safest way is to normalize the input, check if the requirement cannot be standardized, or if there is another possibility of extraction. Have you tried exporting this spreadsheet using other methods? Via database, changing the export type, etc? Is the input always the same?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Leonardo Soares&lt;BR /&gt;RPA Developer Tech Leader&lt;BR /&gt;Bridge Consulting&lt;BR /&gt;América/Brazil&lt;BR /&gt;------------------------------&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 17:04:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67469#M20074</guid>
      <dc:creator>LeonardoSQueiroz</dc:creator>
      <dc:date>2023-11-03T17:04:00Z</dc:date>
    </item>
    <item>
      <title>RE: Rename Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67470#M20075</link>
      <description>&lt;P&gt;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/25418"&gt;@DhirenPatel&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;You could use stages similiar to the following:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17577.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17730iE860A325ACEFF22D/image-size/large?v=v2&amp;amp;px=999" role="button" title="17577.png" alt="17577.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;OL start="1"&gt;
&lt;LI&gt;Getting a listing of the fields ([&lt;EM&gt;Collection Fields&lt;/EM&gt;]).&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17578.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17731i3DDAE1E09A2E01A7/image-size/large?v=v2&amp;amp;px=999" role="button" title="17578.png" alt="17578.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;/DIV&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;Using a regex pattern (that you could store in a BP Env Var to change on the fly) in the "Collection Contains Value" action in BP's "Utility - Collection Manipulation" VBO to see if the listing of fields finds any occurrence of the incorrect field names and if so, has that incorrect occurrence placed into the "Groups" collection .&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;	"^(Ac_Num|Account_Number|Acc_Num)$"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17579.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17733iFD14CCAC34CE6FBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="17579.png" alt="17579.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;/DIV&gt;
&lt;OL start="3"&gt;
&lt;LI&gt;Check to see if the "Collection Contains Value" action found one of those incorrect occurrences. If not, throw an exception.&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;/P&gt;
&lt;OL start="4"&gt;
&lt;LI&gt;If an incorrect occurrence was found, use the [Groups.Group] value to rename the field to "Account Number".&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17580.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17736i6BFB6AA317A64716/image-size/large?v=v2&amp;amp;px=999" role="button" title="17580.png" alt="17580.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;/DIV&gt;
&lt;OL start="5"&gt;
&lt;LI&gt;Repeat the blue section above for the Customer Number.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;This assumes that you never get a field called "Customer Number" but if you did sometimes you can use the "Collection Contains Value" action with the "Exact Value" parameter to make a decision around all the above blue section stages.&lt;/P&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>Fri, 03 Nov 2023 18:25:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67470#M20075</guid>
      <dc:creator>MichealCharron</dc:creator>
      <dc:date>2023-11-03T18:25:00Z</dc:date>
    </item>
    <item>
      <title>RE: Rename Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67471#M20076</link>
      <description>&lt;P&gt;Before reading the data, do a Search/Replace on the top line to normalise any variants of Account Number and Customer Number. Then read the data, then close the file without saving changes. For this to work you have to know what the variants could be.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Carter&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Nov 2023 11:19:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67471#M20076</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2023-11-06T11:19:00Z</dc:date>
    </item>
    <item>
      <title>RE: Rename Collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67472#M20077</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/25418"&gt;@DhirenPatel&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;A simple solution might be to do a find and replace in excel but if not then you can get the worksheet/range as a collection (dont define the collection headers as this might cause an error). Use Get Fields action then loop and using a decision stage look for a name that closely matches what you are looking for e.g. the decision could have StartsWith(Lower([Fields.Name]), "ac") AND InStr(([Fields.Name]),"nu")&amp;gt;0 to match as account number. If true then use the action Rename Field to change the field to what you need.&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Michael ONeil&lt;BR /&gt;Technical Lead developer&lt;BR /&gt;NTTData&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Nov 2023 11:48:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Rename-Collection/m-p/67472#M20077</guid>
      <dc:creator>michaeloneil</dc:creator>
      <dc:date>2023-11-06T11:48:00Z</dc:date>
    </item>
  </channel>
</rss>

