<?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 Unable to accumulate  items  to a list to use in a &amp;quot;Repeat for Each&amp;quot; loop in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unable-to-accumulate-items-to-a-list-to-use-in-a-quot-repeat-for/m-p/6334#M2779</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am struggling to create a list is a proper format to be used later in a "Repeat for each" loop. I begin by using the "Create repeat helper" list where its output is below, ready for the 3 values for to be added.&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2024-04-02 at 4.41.49 PM.png" style="width: 414px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1107i274BD99242A482DF/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2024-04-02 at 4.41.49 PM.png" alt="Screen Shot 2024-04-02 at 4.41.49 PM.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I then have a variable with the 3 values, (output below).&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2024-04-02 at 4.57.41 PM.png" style="width: 906px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1109i6A5E109FD6B3BD94/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2024-04-02 at 4.57.41 PM.png" alt="Screen Shot 2024-04-02 at 4.57.41 PM.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Yet when I try to add&amp;nbsp; the variable&amp;nbsp; values to the "Accumulate" action I get the following output that the later "Repeat for Each" loop doesn't work.&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2024-04-02 at 4.47.58 PM.png" style="width: 902px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1108iD49B93F051791C99/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2024-04-02 at 4.47.58 PM.png" alt="Screen Shot 2024-04-02 at 4.47.58 PM.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My datapill and formula to the Accumulate action is:&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2024-04-02 at 5.02.21 PM.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1110iABCFAB7D0E75A54F/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2024-04-02 at 5.02.21 PM.png" alt="Screen Shot 2024-04-02 at 5.02.21 PM.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I appreciate any help that can be given.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;J&lt;/DIV&gt;</description>
    <pubDate>Tue, 02 Apr 2024 21:05:17 GMT</pubDate>
    <dc:creator>JayMappus</dc:creator>
    <dc:date>2024-04-02T21:05:17Z</dc:date>
    <item>
      <title>Unable to accumulate  items  to a list to use in a "Repeat for Each" loop</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unable-to-accumulate-items-to-a-list-to-use-in-a-quot-repeat-for/m-p/6334#M2779</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am struggling to create a list is a proper format to be used later in a "Repeat for each" loop. I begin by using the "Create repeat helper" list where its output is below, ready for the 3 values for to be added.&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2024-04-02 at 4.41.49 PM.png" style="width: 414px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1107i274BD99242A482DF/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2024-04-02 at 4.41.49 PM.png" alt="Screen Shot 2024-04-02 at 4.41.49 PM.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I then have a variable with the 3 values, (output below).&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2024-04-02 at 4.57.41 PM.png" style="width: 906px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1109i6A5E109FD6B3BD94/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2024-04-02 at 4.57.41 PM.png" alt="Screen Shot 2024-04-02 at 4.57.41 PM.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Yet when I try to add&amp;nbsp; the variable&amp;nbsp; values to the "Accumulate" action I get the following output that the later "Repeat for Each" loop doesn't work.&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2024-04-02 at 4.47.58 PM.png" style="width: 902px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1108iD49B93F051791C99/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2024-04-02 at 4.47.58 PM.png" alt="Screen Shot 2024-04-02 at 4.47.58 PM.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My datapill and formula to the Accumulate action is:&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2024-04-02 at 5.02.21 PM.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1110iABCFAB7D0E75A54F/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2024-04-02 at 5.02.21 PM.png" alt="Screen Shot 2024-04-02 at 5.02.21 PM.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I appreciate any help that can be given.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;J&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Apr 2024 21:05:17 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/unable-to-accumulate-items-to-a-list-to-use-in-a-quot-repeat-for/m-p/6334#M2779</guid>
      <dc:creator>JayMappus</dc:creator>
      <dc:date>2024-04-02T21:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to accumulate  items  to a list to use in a "Repeat for Each" loop</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unable-to-accumulate-items-to-a-list-to-use-in-a-quot-repeat-for/m-p/6335#M2780</link>
      <description>&lt;P&gt;Should I be using Variables instead of Lists? I see where Variables supports "Create a list" and "Add Items to a list".&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 04:25:06 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/unable-to-accumulate-items-to-a-list-to-use-in-a-quot-repeat-for/m-p/6335#M2780</guid>
      <dc:creator>JayMappus</dc:creator>
      <dc:date>2024-04-03T04:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to accumulate  items  to a list to use in a "Repeat for Each" loop</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unable-to-accumulate-items-to-a-list-to-use-in-a-quot-repeat-for/m-p/6336#M2781</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you have an array like ListOfCamp, you can access any item in the array by putting the index number of the item in brackets like ListOfCamp[0] or ListOfCamp[1].&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you make a repeat helper and use it to start a repeat loop, the loop action provides an index data pill starting at zero and ending at the size of the loop. Each loop increases the index by 1.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Understanding this is really important when trying to use a repeat helper to iterate through an array that is not a traditional “list” in Workato (in other words, an array that cannot be directly looped). Especially a primitive array like ListOfCamp.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Within the loop, you want to “add item to list” and use the ListOfCamp data pill with the index data pill of the loops action. Should look like:&lt;/P&gt;&lt;P&gt;ListOfCamp[index data pill from loop]&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The way it’s set up now is erroneous because you’re not providing an index value for ListOfCamp and assuming it is being iterated through, but it’s not. It’s just passing the entire array, which is why your output has the entire array.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your screenshots you’re using split on ListOfCamp but this seems incorrect because split should only be used on strings. (I’m actually surprised it’s not crashing — I didn’t think split would work at all on an array.)&lt;/P&gt;&lt;P&gt;I’m assuming you intend to split the string items in ListOfCamp, but this is not the way to do it. I also assume that once they are split, you want to add each individual result from each split string to the UniqueCampaigns list. This is possible but also requires a different approach, but I’ll wait for you to confirm first.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 05:55:11 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/unable-to-accumulate-items-to-a-list-to-use-in-a-quot-repeat-for/m-p/6336#M2781</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2024-04-03T05:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to accumulate  items  to a list to use in a "Repeat for Each" loop</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unable-to-accumulate-items-to-a-list-to-use-in-a-quot-repeat-for/m-p/6339#M2783</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/8888"&gt;@JayMappus&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;When we have an array say name: ListOfCamp, you can access any item in the array by giving an index number of the item in brackets like ListOfCamp[0] or ListOfCamp[1].&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you make a repeat helper list and use it to for a repeat loop, the loop action provides an index data pill starting at position zero and ending at the size of the loop. Each time increases the index by 1 for the next instance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please provide guidance on the preferred format or structure for the response?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 09:48:36 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/unable-to-accumulate-items-to-a-list-to-use-in-a-quot-repeat-for/m-p/6339#M2783</guid>
      <dc:creator>shivakumara</dc:creator>
      <dc:date>2024-04-03T09:48:36Z</dc:date>
    </item>
  </channel>
</rss>

