<?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 How to use Replace function from dataitem text to collection in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72986#M25591</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have a dataitem where I store HTML text from a file. When I get that file into the dataitem, I want to replace some fields with data from a collection instead of plain text. I tried using calculation stage, but I don't know how the function should be.&lt;BR /&gt;&lt;BR /&gt;I tried this function but it didn't work:&lt;BR /&gt;&lt;BR /&gt;Repace([Collection.Field1]], [Collection.Field1])&lt;BR /&gt;&lt;BR /&gt;I also used this text: "[Collection.Field1]" into the HTML file. Now I want to replace that "[Collection.Field1]" text with [Collection.Field1] collection.&lt;BR /&gt;&lt;BR /&gt;Can you give me any ideas?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Madalina Acsinte&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Tue, 10 Nov 2020 14:52:00 GMT</pubDate>
    <dc:creator>MadalinaAcsinte</dc:creator>
    <dc:date>2020-11-10T14:52:00Z</dc:date>
    <item>
      <title>How to use Replace function from dataitem text to collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72986#M25591</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have a dataitem where I store HTML text from a file. When I get that file into the dataitem, I want to replace some fields with data from a collection instead of plain text. I tried using calculation stage, but I don't know how the function should be.&lt;BR /&gt;&lt;BR /&gt;I tried this function but it didn't work:&lt;BR /&gt;&lt;BR /&gt;Repace([Collection.Field1]], [Collection.Field1])&lt;BR /&gt;&lt;BR /&gt;I also used this text: "[Collection.Field1]" into the HTML file. Now I want to replace that "[Collection.Field1]" text with [Collection.Field1] collection.&lt;BR /&gt;&lt;BR /&gt;Can you give me any ideas?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Madalina Acsinte&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Nov 2020 14:52:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72986#M25591</guid>
      <dc:creator>MadalinaAcsinte</dc:creator>
      <dc:date>2020-11-10T14:52:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to use Replace function from dataitem text to collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72987#M25592</link>
      <description>Could you show an example of the HTML? You may know this already, but here are some examples of how the Replace Function works and maybe this will help:&lt;BR /&gt;&lt;BR /&gt;Example 1:&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;Value in [Text]:
&lt;UL&gt;
&lt;LI&gt;This is an example sentence.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Expression using Replace:
&lt;UL&gt;
&lt;LI&gt;Replace([Text], "sentence", "word")&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Result:
&lt;UL&gt;
&lt;LI&gt;This is an example word.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
Example 2:&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;Value in [Text]:
&lt;UL&gt;
&lt;LI&gt;&amp;lt;p&amp;gt;My HTML paragraph.&amp;lt;/p&amp;gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Expression using Replace:
&lt;UL&gt;
&lt;LI&gt;Replace([Text], "p", "h1")&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Result:
&lt;UL&gt;
&lt;LI&gt;&amp;lt;h1&amp;gt;My HTML paragraph.&amp;lt;/h1&amp;gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;BR /&gt;As far as using Collections, it's the same thing except it may involve needing to loop. If you can show an example of what your input is and what your expected output is, then I think we can help, but I don't totally understand what the input/output looks like.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Dave Morris&lt;BR /&gt;Cano Ai&lt;BR /&gt;Atlanta, GA&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Nov 2020 17:12:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72987#M25592</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2020-11-10T17:12:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to use Replace function from dataitem text to collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72988#M25593</link>
      <description>Hi Dave,&lt;BR /&gt;&lt;BR /&gt;Thank you for your answer.&lt;BR /&gt;&lt;BR /&gt;This an example of the HTML text that I want to replace:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;p class=MsoNormal align=center style='text-align:center'&amp;gt;&amp;lt;b&amp;gt;&amp;lt;span&lt;BR /&gt;style='color:black;mso-color-alt:windowtext'&amp;gt;[Collection.Name]&amp;lt;/span&amp;gt;&amp;lt;o:p&amp;gt;&amp;lt;/o:p&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;BR /&gt;&lt;BR /&gt;The [Collection.Name] that is stored in a dataitem I want to replace it with the value of the collection. For that, I used the replace function in a loop like this:&lt;BR /&gt;&lt;BR /&gt;Replace("[Collection.Name]", "[Collection.Name]", [Collection.Name])&lt;BR /&gt;&lt;BR /&gt;With this function it replace everything that I have stored in the dataitem with the [Collection.Name] and I want to replace just that part.&lt;BR /&gt;&lt;BR /&gt;How can I do it?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Madalina Acsinte&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Nov 2020 19:02:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72988#M25593</guid>
      <dc:creator>MadalinaAcsinte</dc:creator>
      <dc:date>2020-11-10T19:02:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to use Replace function from dataitem text to collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72989#M25594</link>
      <description>The first argument to put into the Replace function is the name of the data item that contains all the HTML. If your HTML text is in a data item called [HTML text], then the Replace function should look like this:&lt;BR /&gt;&lt;SPAN&gt;Replace([HTML text], "[Collection.Name]", [Collection.Name])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Dave Morris&lt;BR /&gt;Cano Ai&lt;BR /&gt;Atlanta, GA&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Nov 2020 20:36:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72989#M25594</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2020-11-10T20:36:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to use Replace function from dataitem text to collection</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72990#M25595</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Actually while using Replace Function follow like this, &lt;BR /&gt;Replace(Data item in which your actual entire HTML text is present, which part of HTML text you want to change, With which value you want to replace it with)&lt;BR /&gt;&lt;BR /&gt;For example: Replace([My HTML], "[Collection.Name]", [Collection.Name])&lt;BR /&gt;&lt;BR /&gt;Note: For Data item there is no need of Double Quotes surrounded by Square Brackets. (i.e., &lt;SPAN&gt;Replace(&lt;STRONG&gt;"&lt;/STRONG&gt;[Collection.Name]&lt;STRONG&gt;"&lt;/STRONG&gt;, "[Collection.Name]", [Collection.Name]))&lt;BR /&gt;&lt;BR /&gt;Hope this solved your query. If not please let me know.&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Yeswa Vaibhav Alwar Nerella&lt;BR /&gt;Associate Consultant&lt;BR /&gt;Capgemini&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Nov 2020 13:02:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-use-Replace-function-from-dataitem-text-to-collection/m-p/72990#M25595</guid>
      <dc:creator>Yeswa_Vaibhav_1</dc:creator>
      <dc:date>2020-11-12T13:02:00Z</dc:date>
    </item>
  </channel>
</rss>

