<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Index Array with Nested arrays</title><link>https://community.appian.com/discussions/f/data/17947/index-array-with-nested-arrays</link><description>Hello, 
 I&amp;#39;m having this problem: 
 I have to divide an array when 2 conditions are met (same name and country). 
 I&amp;#39;ve resolved this problem using &amp;quot;whereContains(firstCondition)&amp;quot; interescting it with &amp;quot;whereContains(Second Condition)&amp;quot; 
 
 Now i have this</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70671?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:47:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eb5d9298-35c6-478b-89d0-571efd359c8e</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Thanks for confirming :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70670?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:46:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dc57fc0c-e241-46a6-bad9-d0e618f5abb0</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70669?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:45:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1e5b93e8-ba5c-4cad-b0d4-1846f76a0326</guid><dc:creator>Gabriele Camilli</dc:creator><description>&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;that&amp;#39;s a great solution!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70668?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:41:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:64406782-0b70-4f6a-a8a0-8f1e8fcb74fc</guid><dc:creator>April Schuppel</dc:creator><description>&lt;p&gt;Hi  - looks our moderation rules flagged those comments for text repetition (probably for the large list of dictionary)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve approved the moderated comments and they are back in this thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70667?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:41:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0ca9986f-f919-4236-87af-5ed71af33f60</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Looks like the removed comments are back now, FWIW.&amp;nbsp; Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70666?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:37:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:04cbdbc9-85bf-43c8-bc09-6f92ac25cb96</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Thanks, I hadn&amp;#39;t sought out a /help page previously, but will note that for the future.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70664?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:30:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a40daa8b-da34-459a-9011-66a30584bf54</guid><dc:creator>Robert Shankin</dc:creator><description>&lt;p&gt;I&amp;#39;ll pass this info along to the admins.&lt;/p&gt;
&lt;p&gt;Thanks for pointing it out.&lt;/p&gt;
&lt;p&gt;Note, too, Everyone -&lt;/p&gt;
&lt;p&gt;On this page:&amp;nbsp;&lt;a href="/p/help"&gt;https://community.appian.com/p/help&lt;/a&gt;&amp;nbsp;- it does provide the email address community@appian.com&amp;nbsp; where you can send questions if your having trouble with the site.&amp;nbsp; Sorry for the inconvenience. In this case, I&amp;#39;ve sent a note to that mailbox.&amp;nbsp; Let&amp;#39;s see what they say.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Given that it&amp;#39;s almost thanksgiving I do hereby reserve the right to sign off all messages with &amp;quot;gobble gobble&amp;quot;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Gobble gobble,&lt;/p&gt;
&lt;p&gt;Rob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70663?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:20:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:25222d4a-2e05-4e61-8c0a-217e23cc243e</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;In the above thread, Gabriele and I both had a comment removed within the past few minutes (shortly before my reply saying that some of our replies had disappeared).&amp;nbsp; She says hers was flagged as &amp;quot;spam&amp;quot; but i&amp;#39;m unclear on the details.&amp;nbsp; All I know is that two replies are now gone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70662?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:18:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:553e5b88-83d8-4b7c-b07c-b85ed218432e</guid><dc:creator>Robert Shankin</dc:creator><description>&lt;p&gt;Spam in your mailbox or spam on this forum?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70661?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:13:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:39fc61be-e2ac-40ba-9c7b-5194bebe1ffc</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;&lt;a href="/members/robert.shankin"&gt;Robert Shankin&lt;/a&gt;- do you (or anyone else) have the ability to look into why a few of the replies above were marked as &amp;quot;Spam&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70660?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:10:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:45b28eb5-6ef7-4952-b27c-41312b8ab883</guid><dc:creator>Gabriele Camilli</dc:creator><description>&lt;p&gt;No, sorry, what about you?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It was flagged as &amp;quot;Spam&amp;quot;, don&amp;#39;t know why&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70658?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 15:07:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:15362c93-7d05-41eb-b82f-94dab89d1fb5</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;My last reply (as well as yours)&amp;nbsp;have apparently disappeared - did you have a chance to see it?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;edit: restored, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70657?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 14:54:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f0966953-d144-48e7-a689-dfb6ede063f5</guid><dc:creator>Gabriele Camilli</dc:creator><description>&lt;p&gt;&lt;span&gt;ri!array is in this form (i removed some fields to make it readable, there would be many more):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{name: &amp;quot;a&amp;quot;, countryId: &amp;quot;201&amp;quot;, productName: &amp;quot;ex1&amp;quot;, packSize: &amp;quot;20 tablets&amp;quot;}, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{name: &amp;quot;a&amp;quot;, countryId: &amp;quot;201&amp;quot;, productName: &amp;quot;ex2&amp;quot;, packSize: &amp;quot;12 tablets&amp;quot;}, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{name: &amp;quot;a&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;ex4&amp;quot;, packSize: &amp;quot;10 tablets&amp;quot;}, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{name: &amp;quot;a&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;ex5&amp;quot;, packSize: &amp;quot;6 tablets&amp;quot;}, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{&lt;/span&gt;&lt;span&gt;name: &amp;quot;b&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;bel21&amp;quot;, packSize: &amp;quot;21 tablets&amp;quot;},&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; {name: &amp;quot;b&amp;quot;, countryId: &amp;quot;15&amp;quot;, productName: &amp;quot;bel42&amp;quot;, packSize: &amp;quot;42 tablets&amp;quot;}, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;p18A&amp;quot;, packSize: &amp;quot;18 tablets&amp;quot;}, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;p24A&amp;quot;, packSize: &amp;quot;24 tablets&amp;quot;}, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;p27B&amp;quot;, packSize: &amp;quot;27 tablets&amp;quot;}, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;, productName: &amp;quot;p27A&amp;quot;, packSize: &amp;quot;27 tablets&amp;quot;}, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;, productName: &amp;quot;p18B&amp;quot;, packSize: &amp;quot;18 tablets&amp;quot;}, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;, productName: &amp;quot;p24B&amp;quot;, packSize: &amp;quot;24 tablets&amp;quot;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The division should be:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;{&lt;br /&gt; {&lt;br /&gt; {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;201&amp;quot;,productName: &amp;quot;ex1&amp;quot;, packSize: &amp;quot;20 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;201&amp;quot;,productName: &amp;quot;ex2&amp;quot;, packSize: &amp;quot;12 tablets&amp;quot;}&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;ex4&amp;quot;, packSize: &amp;quot;10 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;ex5&amp;quot;, packSize: &amp;quot;6 tablets&amp;quot;}&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; {name: &amp;quot;b&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;bel21&amp;quot;, packSize: &amp;quot;21 tablets&amp;quot;}&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; {name: &amp;quot;b&amp;quot;, countryId: &amp;quot;15&amp;quot;,productName: &amp;quot;bel42&amp;quot;, packSize: &amp;quot;42 tablets&amp;quot;}&lt;br /&gt;},&lt;br /&gt;{ {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;p18A&amp;quot;, packSize: &amp;quot;18 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;p24A&amp;quot;, packSize: &amp;quot;24 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;p27B&amp;quot;, packSize: &amp;quot;27 tablets&amp;quot;}&lt;/p&gt;
&lt;p&gt;},&lt;br /&gt;{&lt;br /&gt; {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;,productName: &amp;quot;p27A&amp;quot;, packSize: &amp;quot;27 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;,productName: &amp;quot;p18B&amp;quot;, packSize: &amp;quot;18 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;,productName: &amp;quot;p24B&amp;quot;, packSize: &amp;quot;24 tablets&amp;quot;}&lt;br /&gt;}&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70656?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 14:51:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b511e5dd-041e-4fa7-9d11-7c19734b6c88</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Consider this alternate implementation (i made up my own structure for ri!array as you hadn&amp;#39;t replied yet, but I think it&amp;#39;s similar enough to fit into your data model)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!array: {
    {
      item: &amp;quot;stapler&amp;quot;,
      name: &amp;quot;Mike&amp;quot;,
      countryId: 1
    },
    {
      item: &amp;quot;printer&amp;quot;,
      name: &amp;quot;Larry&amp;quot;,
      countryId: 2
    },
    {
      item: &amp;quot;laptop&amp;quot;,
      name: &amp;quot;Mike&amp;quot;,
      countryId: 1
    },
    {
      item: &amp;quot;glass&amp;quot;,
      name: &amp;quot;Mike&amp;quot;,
      countryId: 3
    }
  },
  
  local!allNameCountryPairs: a!forEach(
    local!array,
    {
      name: fv!item.name,
      countryId: fv!item.countryId
    }
  ),
  local!uniqueNameCountryPairs: union(local!allNameCountryPairs, local!allNameCountryPairs),

  a!forEach(
    local!uniqueNameCountryPairs,
    a!localVariables(
      local!currentEntry: fv!item,
      a!forEach(
        local!array,
        if(
          and(
            local!currentEntry.name = fv!item.name,
            local!currentEntry.countryId = fv!item.countryId
          ),
          fv!item,
          {}
        )
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here, instead of worrying about grabbing indices for the unique names / country IDs and trying to do a complicated extraction of the overlaps, we instead simply get a list of all unique name/countryId pairs first, then iterate over that list and (inside) iterate over the original list and return any entries where the values match.&amp;nbsp; &amp;nbsp;Output below:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1574693452412v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70655?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 14:46:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7b0bdda5-1c86-4754-8745-9a4352d2868a</guid><dc:creator>Gabriele Camilli</dc:creator><description>&lt;div class="SplitPaneLayout---pane SplitPaneLayout---secondary_pane"&gt;
&lt;div class="SplitPaneLayout---contents"&gt;
&lt;div class="ContentLayout---content_layout"&gt;
&lt;div class="SectionLayout2---sectionLayout"&gt;
&lt;div class="rah-static rah-static--height-auto"&gt;
&lt;div&gt;
&lt;div class="SectionLayout2---section_contents"&gt;
&lt;div class="ColumnArrayLayout---column_layout ColumnArrayLayout---full ColumnArrayLayout---fixed appian-context-last-in-list"&gt;
&lt;div class="ColumnLayout---column ColumnLayout---align_start ColumnLayout---top appian-context-last-in-list"&gt;
&lt;div class="FieldLayout---field_layout FieldLayout---inColumnArrayLayout appian-context-last-in-list"&gt;
&lt;div class="FieldLayout---input_column"&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p"&gt;&lt;strong&gt;ri!array (i discarded some field to make it readable):&lt;/strong&gt;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p"&gt;List of Dictionary: 12 items&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;a&amp;quot; countryId: &amp;quot;201&amp;quot; productName: &amp;quot;ex1&amp;quot; packSize: &amp;quot;20 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;a&amp;quot; countryId: &amp;quot;201&amp;quot; productName: &amp;quot;ex2&amp;quot; packSize: &amp;quot;12 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;b&amp;quot; countryId: &amp;quot;121&amp;quot; productName: &amp;quot;bel21&amp;quot; packSize: &amp;quot;21 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;c&amp;quot; countryId: &amp;quot;121&amp;quot; productName: &amp;quot;p18A&amp;quot; packSize: &amp;quot;18 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;c&amp;quot; countryId: &amp;quot;121&amp;quot; productName: &amp;quot;p24A&amp;quot; packSize: &amp;quot;24 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;c&amp;quot; countryId: &amp;quot;52&amp;quot; productName: &amp;quot;p27A&amp;quot; packSize: &amp;quot;27 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;c&amp;quot; countryId: &amp;quot;121&amp;quot; productName: &amp;quot;p27B&amp;quot; packSize: &amp;quot;27 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;c&amp;quot; countryId: &amp;quot;52&amp;quot; productName: &amp;quot;p18B&amp;quot; packSize: &amp;quot;18 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;c&amp;quot; countryId: &amp;quot;52&amp;quot; productName: &amp;quot;p24B&amp;quot; packSize: &amp;quot;24 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;b&amp;quot; countryId: &amp;quot;12&amp;quot; productName: &amp;quot;bel42&amp;quot; packSize: &amp;quot;42 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;a&amp;quot; countryId: &amp;quot;121&amp;quot; productName: &amp;quot;ex4&amp;quot; packSize: &amp;quot;10 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:30px;"&gt;Dictionary&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;name: &amp;quot;a&amp;quot; countryId: &amp;quot;121&amp;quot; productName: &amp;quot;ex5&amp;quot; packSize: &amp;quot;6 tablets&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p" style="padding-left:60px;"&gt;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start elements---global_p"&gt;&lt;strong&gt;Raw&lt;/strong&gt;:&amp;nbsp;&lt;em&gt;{{name: &amp;quot;a&amp;quot;, countryId: &amp;quot;201&amp;quot;, productName: &amp;quot;ex1&amp;quot;, packSize: &amp;quot;20 tablets&amp;quot;}, {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;201&amp;quot;, productName: &amp;quot;ex2&amp;quot;, packSize: &amp;quot;12 tablets&amp;quot;}, {name: &amp;quot;b&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;bel21&amp;quot;, packSize: &amp;quot;21 tablets&amp;quot;}, {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;p18A&amp;quot;, packSize: &amp;quot;18 tablets&amp;quot;}, {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;p24A&amp;quot;, packSize: &amp;quot;24 tablets&amp;quot;}, {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;, productName: &amp;quot;p27A&amp;quot;, packSize: &amp;quot;27 tablets&amp;quot;}, {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;p27B&amp;quot;, packSize: &amp;quot;27 tablets&amp;quot;}, {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;, productName: &amp;quot;p18B&amp;quot;, packSize: &amp;quot;18 tablets&amp;quot;}, {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;, productName: &amp;quot;p24B&amp;quot;, packSize: &amp;quot;24 tablets&amp;quot;}, {name: &amp;quot;b&amp;quot;, countryId: &amp;quot;12&amp;quot;, productName: &amp;quot;bel42&amp;quot;, packSize: &amp;quot;42 tablets&amp;quot;}, {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;ex4&amp;quot;, packSize: &amp;quot;10 tablets&amp;quot;}, {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;121&amp;quot;, productName: &amp;quot;ex5&amp;quot;, packSize: &amp;quot;6 tablets&amp;quot;}}&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="SplitPaneLayout---separator SplitPaneLayout---horizontal SplitPaneLayout---resizable"&gt;
&lt;div class="SplitPaneLayout---default_direction SplitPaneLayout---collapse_control_parent SplitPaneLayout---parent_horizontal SplitPaneLayout---collapse_control_parent_right"&gt;&lt;i class="font-awesome---fa font-awesome---fa-arrow-left"&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="SplitPaneLayout---default_direction SplitPaneLayout---collapse_control_parent SplitPaneLayout---parent_horizontal SplitPaneLayout---collapse_control_parent_right"&gt;&lt;/div&gt;
&lt;div class="SplitPaneLayout---default_direction SplitPaneLayout---collapse_control_parent SplitPaneLayout---parent_horizontal SplitPaneLayout---collapse_control_parent_right"&gt;&lt;/div&gt;
&lt;div class="SplitPaneLayout---default_direction SplitPaneLayout---collapse_control_parent SplitPaneLayout---parent_horizontal SplitPaneLayout---collapse_control_parent_right"&gt;&lt;/div&gt;
&lt;div class="SplitPaneLayout---default_direction SplitPaneLayout---collapse_control_parent SplitPaneLayout---parent_horizontal SplitPaneLayout---collapse_control_parent_right"&gt;The result should be:&lt;/div&gt;
&lt;div class="SplitPaneLayout---default_direction SplitPaneLayout---collapse_control_parent SplitPaneLayout---parent_horizontal SplitPaneLayout---collapse_control_parent_right"&gt;&lt;/div&gt;
&lt;div class="SplitPaneLayout---default_direction SplitPaneLayout---collapse_control_parent SplitPaneLayout---parent_horizontal SplitPaneLayout---collapse_control_parent_right"&gt;{&lt;br /&gt; {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;201&amp;quot;,productName: &amp;quot;ex1&amp;quot;, packSize: &amp;quot;20 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;201&amp;quot;,productName: &amp;quot;ex2&amp;quot;, packSize: &amp;quot;12 tablets&amp;quot;}&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;ex4&amp;quot;, packSize: &amp;quot;10 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;a&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;ex5&amp;quot;, packSize: &amp;quot;6 tablets&amp;quot;}&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; {name: &amp;quot;b&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;bel21&amp;quot;, packSize: &amp;quot;21 tablets&amp;quot;}&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; {name: &amp;quot;b&amp;quot;, countryId: &amp;quot;15&amp;quot;,productName: &amp;quot;bel42&amp;quot;, packSize: &amp;quot;42 tablets&amp;quot;}&lt;br /&gt;},&lt;br /&gt;{ {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;p18A&amp;quot;, packSize: &amp;quot;18 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;p24A&amp;quot;, packSize: &amp;quot;24 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;121&amp;quot;,productName: &amp;quot;p27B&amp;quot;, packSize: &amp;quot;27 tablets&amp;quot;}&lt;br /&gt;&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;,productName: &amp;quot;p27A&amp;quot;, packSize: &amp;quot;27 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;,productName: &amp;quot;p18B&amp;quot;, packSize: &amp;quot;18 tablets&amp;quot;},&lt;br /&gt; {name: &amp;quot;c&amp;quot;, countryId: &amp;quot;52&amp;quot;,productName: &amp;quot;p24B&amp;quot;, packSize: &amp;quot;24 tablets&amp;quot;}&lt;br /&gt;}&lt;/div&gt;
&lt;div class="SplitPaneLayout---default_direction SplitPaneLayout---collapse_control_parent SplitPaneLayout---parent_horizontal SplitPaneLayout---collapse_control_parent_right"&gt;&lt;/div&gt;
&lt;div class="SplitPaneLayout---default_direction SplitPaneLayout---collapse_control_parent SplitPaneLayout---parent_horizontal SplitPaneLayout---collapse_control_parent_right"&gt;Thanks&lt;/div&gt;
&lt;/div&gt;
&lt;div class="SplitPaneLayout---pane SplitPaneLayout---primary_pane SplitPaneLayout---primary_pane_animation_horizontal SplitPaneLayout---collapsed"&gt;
&lt;div class="SplitPaneLayout---contents"&gt;
&lt;div class="ExprDesignerSectionLayout---layout"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70652?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 14:10:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:93c963b7-6fba-4241-9465-0736a471aa87</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Thanks for clarifying.&amp;nbsp; Should I assume that the one instance of ri!name in your example code should actually read as ri!array also?&amp;nbsp; I see that local!whereMa was intended to be local!whereName, thanks for fixing that.&lt;/p&gt;
&lt;p&gt;Can you perhaps provide a small example of an input value for &lt;strong&gt;ri!array,&lt;/strong&gt;&amp;nbsp;and what your expected end result would be given that input?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70649?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 14:01:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8376cf3b-87f3-41f7-8e10-285fc4686640</guid><dc:creator>Gabriele Camilli</dc:creator><description>&lt;p&gt;ri!array is an array of cdt.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The aim would be to subdived this array into sub arrays that have the same name and country.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What i thought is to get the interesaction of where the values of country is the same with where the name are the same.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The data is retrivable also by a query rule, but i would have the same problem of cycling for all the countries and names in the cdt Array (ri!array)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The end goal would be to have a List of List of the cdt, a list of (ri!array) divided&amp;nbsp;&lt;span&gt;simultaneously by name and country&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70647?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 13:32:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:83939151-34a2-4964-a596-2d0c69feda53</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Some follow-up questions: what is the nature and contents of &lt;strong&gt;ri!array&lt;/strong&gt;, and of&amp;nbsp;&lt;strong&gt;ri!name&lt;/strong&gt;?&amp;nbsp; Where and how is&amp;nbsp;&lt;em&gt;&lt;/em&gt;&lt;em&gt;local!whereMa&lt;/em&gt; defined?&amp;nbsp; In plain terms, what are you trying to accomplish with this code?&amp;nbsp; I think it might be more helpful if we can step back and see if this can be simplified somewhat, which I suspect is true but it&amp;#39;s hard to know without more details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70646?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 13:24:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:53e50d9c-663b-4927-acbf-d33440f90c00</guid><dc:creator>Gabriele Camilli</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for the answer&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately a!flatten() doesn&amp;#39;t preserve the array structure that i need (the List of List of Numbers). There is a way to make a!flatten() work only on the top most level?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70642?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 12:37:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:57aeb405-9904-4a58-9974-ed4e8add7a38</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Just FYI - &lt;em&gt;wherecontains()&lt;/em&gt; already accepts 2 array parameters, so you might not even need to &lt;em&gt;a!forEach()&lt;/em&gt; over &lt;strong&gt;ri!array.name&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Also: have you tried passing your current output through the &lt;em&gt;a!flatten()&lt;/em&gt; function yet?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70641?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 12:13:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6e86a38a-2f21-4fdd-b26b-00abc8c92427</guid><dc:creator>Gabriele Camilli</dc:creator><description>&lt;p&gt;input: (ri!array)&lt;/p&gt;
&lt;p&gt;function for intersection:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;{ &lt;em&gt;load(&lt;/em&gt;&lt;br /&gt;&lt;em&gt; local!whereName:&lt;strong&gt; a!forEach(&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; items: &lt;strong&gt;union(ri!array.name,ri!array.name)&lt;/strong&gt;, &lt;/em&gt;&lt;br /&gt;&lt;em&gt;expression: &lt;strong&gt;wherecontains(fv!item,&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;&lt;strong&gt;&lt;em&gt;ri!array.name),&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;local!whereCountry:&lt;strong&gt; a!forEach(&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; items: &lt;strong&gt;union(ri!array.countryId,ri!array.countryId),&lt;/strong&gt; &lt;/em&gt;&lt;br /&gt;&lt;em&gt;expression: &lt;strong&gt;wherecontains(fv!item,&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;ri!array.countryId)),&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;local!result: &lt;strong&gt;a!forEach(&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; items:&lt;strong&gt; local!whereName&lt;/strong&gt;,&lt;/em&gt;&lt;br /&gt;&lt;em&gt; expression: &lt;strong&gt;rule!nestedIntersaction(numberArray: fv!item, arrayOfArrays: local!whereCountry) &lt;/strong&gt;&lt;/em&gt;/*This rule makes the intersaction of the local variables*/&lt;br /&gt;&lt;strong&gt;&lt;em&gt;),&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;local!result&lt;/em&gt;&lt;br /&gt;&lt;em&gt;)}&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Where the result is:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/4786.nested-arrays.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The result that i want now is:&lt;span style="font-family:inherit;"&gt;ri!array[&lt;/span&gt;&lt;strong style="font-family: inherit;"&gt;SUB_ARRAY&lt;/strong&gt;&lt;span style="font-family: inherit;"&gt;]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For every Sub_Array of type &amp;quot;List of Number&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The problem i find is in the fact that mine is a List of List of List of Number, with this it doesn&amp;#39;t work a simple &amp;quot;a!forEach&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Array with Nested arrays</title><link>https://community.appian.com/thread/70640?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 12:02:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7192ab00-b05d-43db-85d8-7983e8b9b89f</guid><dc:creator>Krishna Chaitanya Mallavarapu</dc:creator><description>&lt;p&gt;Hi Gabriele,&lt;/p&gt;
&lt;p&gt;Can you explain your use case with example like&amp;nbsp;&lt;/p&gt;
&lt;p&gt;input : array1&lt;/p&gt;
&lt;p&gt;input : array2&amp;nbsp;&lt;/p&gt;
&lt;p&gt;output : ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>