<?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: Building XML from Collection containing nested collection in Digital Exchange</title>
    <link>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59671#M1882</link>
    <description>&lt;P&gt;I see, instead of use Read Collection Field, simply use calculation stage to extract all the data that you need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, Main Collection has 3 fields, one of wich is a nested collection with data in it.&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7789.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7964i20401E5B4A3E4CD9/image-size/large?v=v2&amp;amp;px=999" role="button" title="7789.png" alt="7789.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7790.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7966i1836381A7EB7FC57/image-size/large?v=v2&amp;amp;px=999" role="button" title="7790.png" alt="7790.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;So, the following flow is very simple and you can extract all the data with a simple multi calculation stage.&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7791.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7963iD763222BB9A15531/image-size/large?v=v2&amp;amp;px=999" role="button" title="7791.png" alt="7791.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;To extract the data, simply call the fields and save it on a Data item of the same type, Blue Prism allow some cast, like number to text, date to text and so on but it is better to maintain the same data type.&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7793.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7968i0A3350189DB8814A/image-size/large?v=v2&amp;amp;px=999" role="button" title="7793.png" alt="7793.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;Set next step and you can see the values in our data items.&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7794.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7969i75DCA53E12E88DBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="7794.png" alt="7794.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;This is only an example, first you have to loop Main Collection to change the index of the row, then you have to do a nested loop to extract the data of "Current Products", with that you can work on.&lt;/P&gt;
&lt;P&gt;Hope it helps!&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Daniel Sanhueza&lt;BR /&gt;RPA Professional Developer&lt;BR /&gt;Deloitte&lt;BR /&gt;America/Santiago&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Thu, 29 Feb 2024 23:15:00 GMT</pubDate>
    <dc:creator>Daniel_Sanhueza</dc:creator>
    <dc:date>2024-02-29T23:15:00Z</dc:date>
    <item>
      <title>Building XML from Collection containing nested collection</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59668#M1879</link>
      <description>&lt;P&gt;&lt;STRONG&gt;This is a work-around attempt.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I am attempting to consume a SOAP API&amp;nbsp; where methods define input/output parameters with Request/Response objects. Importing the WSDL/XSD creates methods without input/output parameters.&lt;/P&gt;
&lt;P&gt;Blue Prism Support indicates complex datatypes (groups) are not supported and I should use the HTTP VBO to consume the SOAP service.&lt;/P&gt;
&lt;P&gt;In order to consume the SOAP service, I need to build XML for the HTTP VBO.&lt;/P&gt;
&lt;P&gt;I built a VBO with a method to convert a collection to an xml string.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Problem/Question.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Using the Utility Collection Manipulation VBO I was able to&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Extract a list of fields and data types from the collection.&lt;/LI&gt;
&lt;LI&gt;For Text fields get value of fields.&lt;/LI&gt;
&lt;LI&gt;Create Text string with begin / end tag with value&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;When I encounter a field name of nested collection, I am unable to use the field name to get the collection to apply the primitive field logic to.&lt;/P&gt;
&lt;P&gt;How do I use field name to access nested collection.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Picture of described VBO method.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7827.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8004i3F1FA9BC48D1B173/image-size/large?v=v2&amp;amp;px=999" role="button" title="7827.png" alt="7827.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Emmett Blake&lt;BR /&gt;Automation Developer&lt;BR /&gt;TMHP&lt;BR /&gt;America/Chicago&lt;BR /&gt;------------------------------&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 19:17:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59668#M1879</guid>
      <dc:creator>emmett.r.blake</dc:creator>
      <dc:date>2024-02-29T19:17:00Z</dc:date>
    </item>
    <item>
      <title>RE: Building XML from Collection containing nested collection</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59669#M1880</link>
      <description>&lt;P&gt;Hello Emmet,&lt;/P&gt;
&lt;P&gt;Is there any possibility of extracting the nested collection before creating the long XML string? What I mean is, first create the XML string for the nested collection and then add it to the main string when needed.&lt;/P&gt;
&lt;P&gt;I once had a process with many nested collections, 15 aprox (such as clients with products, economic groups, experian info, etc.) obtained through various internal and external platforms of a bank. Long story short, they needed an HTML report consolidating all the client data. What I did back then was extract all the nested collections, and for each one, I created a table inside a div. Then, when all the divs were created, I joined them using a calc stage, creating a data item type text just like did with&amp;nbsp;&lt;SPAN jsname="r4nke" class="JCzEY ZwRhJd"&gt;&lt;SPAN class="CSkcDe"&gt;[ResultingXml]&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp; and then using that to create the HTML file that was perfectly visible to the business. &lt;/P&gt;
&lt;P&gt;Is it possible to apply something similar in your case?&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;If this was helpful, please mark it as the best answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Daniel Sanhueza&lt;BR /&gt;RPA Professional Developer&lt;BR /&gt;Deloitte&lt;BR /&gt;America/Santiago&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Feb 2024 21:25:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59669#M1880</guid>
      <dc:creator>Daniel_Sanhueza</dc:creator>
      <dc:date>2024-02-29T21:25:00Z</dc:date>
    </item>
    <item>
      <title>RE: Building XML from Collection containing nested collection</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59670#M1881</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;
&lt;P&gt;Tell me more.&lt;/P&gt;
&lt;P&gt;The challenge I think I have is I can identify the name of the collection but cannot access the identified collection.&lt;/P&gt;
&lt;P&gt;In the example I am able to use the collection manipulation VBO method Read Collection Field and get text back.&lt;/P&gt;
&lt;P&gt;If it is the field type is collection I have not found a way to address the [Collection.[NestedCollection]]&lt;/P&gt;
&lt;P&gt;Blue Prism doesn't seem to have facility for dynamic interpolation, and I haven't found an object.method to return to me a copy of the nested collection.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Emmett Blake&lt;BR /&gt;Automation Developer&lt;BR /&gt;TMHP&lt;BR /&gt;America/Chicago&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Feb 2024 22:08:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59670#M1881</guid>
      <dc:creator>emmett.r.blake</dc:creator>
      <dc:date>2024-02-29T22:08:00Z</dc:date>
    </item>
    <item>
      <title>RE: Building XML from Collection containing nested collection</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59671#M1882</link>
      <description>&lt;P&gt;I see, instead of use Read Collection Field, simply use calculation stage to extract all the data that you need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, Main Collection has 3 fields, one of wich is a nested collection with data in it.&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7789.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7964i20401E5B4A3E4CD9/image-size/large?v=v2&amp;amp;px=999" role="button" title="7789.png" alt="7789.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7790.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7966i1836381A7EB7FC57/image-size/large?v=v2&amp;amp;px=999" role="button" title="7790.png" alt="7790.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;So, the following flow is very simple and you can extract all the data with a simple multi calculation stage.&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7791.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7963iD763222BB9A15531/image-size/large?v=v2&amp;amp;px=999" role="button" title="7791.png" alt="7791.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;To extract the data, simply call the fields and save it on a Data item of the same type, Blue Prism allow some cast, like number to text, date to text and so on but it is better to maintain the same data type.&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7793.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7968i0A3350189DB8814A/image-size/large?v=v2&amp;amp;px=999" role="button" title="7793.png" alt="7793.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;Set next step and you can see the values in our data items.&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7794.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7969i75DCA53E12E88DBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="7794.png" alt="7794.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;This is only an example, first you have to loop Main Collection to change the index of the row, then you have to do a nested loop to extract the data of "Current Products", with that you can work on.&lt;/P&gt;
&lt;P&gt;Hope it helps!&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Daniel Sanhueza&lt;BR /&gt;RPA Professional Developer&lt;BR /&gt;Deloitte&lt;BR /&gt;America/Santiago&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Feb 2024 23:15:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59671#M1882</guid>
      <dc:creator>Daniel_Sanhueza</dc:creator>
      <dc:date>2024-02-29T23:15:00Z</dc:date>
    </item>
    <item>
      <title>RE: Building XML from Collection containing nested collection</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59672#M1883</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Daniel,&lt;/P&gt;
&lt;P&gt;That example will work, but only for a specific collection.&lt;/P&gt;
&lt;P&gt;I was trying to create a reusable widget that would create xml from any collection.&lt;/P&gt;
&lt;P&gt;if a calc or multi-calc allowed dynamic/variable interpolation I would jump on it.&lt;/P&gt;
&lt;P&gt;Dynamic/Variable interpolation might look something like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;[collection&lt;SPAN style="background-color: rgb(241, 196, 15);"&gt;.[Collection Fields.Field Name]&lt;/SPAN&gt;]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Where Collection Fields was populated by&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7797.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7971iF8117AD07A5FE344/image-size/large?v=v2&amp;amp;px=999" role="button" title="7797.png" alt="7797.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7798.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7972iF819CD5187FE502C/image-size/large?v=v2&amp;amp;px=999" role="button" title="7798.png" alt="7798.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Emmett Blake&lt;BR /&gt;Automation Developer&lt;BR /&gt;TMHP&lt;BR /&gt;America/Chicago&lt;BR /&gt;------------------------------&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 06:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59672#M1883</guid>
      <dc:creator>emmett.r.blake</dc:creator>
      <dc:date>2024-03-01T06:00:00Z</dc:date>
    </item>
    <item>
      <title>RE: Building XML from Collection containing nested collection</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59673#M1884</link>
      <description>&lt;P&gt;Emmett,&lt;/P&gt;
&lt;P&gt;It might be as simple as your formatting.&amp;nbsp; In my [limited] experience of working with nested collections, the identification I have used has been:&lt;/P&gt;
&lt;P&gt;[NamePrimaryCollection.NameNestedCollection1.NameNestedCollection2.NameColumn]&lt;/P&gt;
&lt;P&gt;That is, there are no internal square brackets.&amp;nbsp; I don't know how to better say this than, the name of the nested collection is treated like the name of any standard column/field.&amp;nbsp; All of this is predicated on your various names being constant or known.&amp;nbsp; Otherwise, I have had to resort to something akin to what Daniel has suggested.&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;Red&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Robert "Red" Stephens&lt;BR /&gt;Application Developer, RPA&lt;BR /&gt;Sutter Health&lt;BR /&gt;Sacramento, CA&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Mar 2024 13:54:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59673#M1884</guid>
      <dc:creator>stepher</dc:creator>
      <dc:date>2024-03-01T13:54:00Z</dc:date>
    </item>
    <item>
      <title>RE: Building XML from Collection containing nested collection</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59674#M1885</link>
      <description>&lt;P&gt;Hi Red,&lt;/P&gt;
&lt;P&gt;You are absolutely right an explicit path seems to be the only option for calc/multi-calc.&lt;/P&gt;
&lt;P&gt;My challenge is how to dynamically access nested collections without foreknowledge of collection structure.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Emmett Blake&lt;BR /&gt;Automation Developer&lt;BR /&gt;TMHP&lt;BR /&gt;America/Chicago&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Mar 2024 14:39:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Building-XML-from-Collection-containing-nested-collection/m-p/59674#M1885</guid>
      <dc:creator>emmett.r.blake</dc:creator>
      <dc:date>2024-03-01T14:39:00Z</dc:date>
    </item>
  </channel>
</rss>

