<?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 For Each Loop only loading in the final record in a Values array from a HTTP Get Request in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/for-each-loop-only-loading-in-the-final-record-in-a-values-array/m-p/9297#M3815</link>
    <description>&lt;P&gt;I have a HTTP Request that successfully retrieves some data and the format looks something like:&lt;BR /&gt;{&lt;BR /&gt;"Response": {&lt;BR /&gt;"_odata.context": "TEST",&lt;BR /&gt;"Value": [&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST0",&lt;BR /&gt;"C2_DESCRIPTION": "TEST0",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST0",&lt;BR /&gt;"C4_CREATED": "TEST0"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST1",&lt;BR /&gt;"C2_DESCRIPTION": "TEST1",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST1",&lt;BR /&gt;"C4_CREATED": "TEST1"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST2",&lt;BR /&gt;"C2_DESCRIPTION": "TEST2",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST2",&lt;BR /&gt;"C4_CREATED": "TEST2"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST3",&lt;BR /&gt;"C2_DESCRIPTION": "TEST3",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST3",&lt;BR /&gt;"C4_CREATED": "TEST3"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST4",&lt;BR /&gt;"C2_DESCRIPTION": "TEST4",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST4",&lt;BR /&gt;"C4_CREATED": "TEST4"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST5",&lt;BR /&gt;"C2_DESCRIPTION": "TEST5",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST5",&lt;BR /&gt;"C4_CREATED": "TEST5"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I then have a for each loop that loops through this Values array, I then perform a Search to Creatio and then Create/Update accordingly. However, for whatever reason only the final item in this array is actually Updated/Created in Creatio (I am only mapping the fields ORGANIZATION_ID and DESCRIPTION).&amp;nbsp;&lt;BR /&gt;It would seem that the Values array is being accepted and iterated through correctly as my output when testing the recipe is:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Index:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;5&lt;/SPAN&gt;,&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Is first:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;false&lt;/SPAN&gt;,&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Is last:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;true&lt;/SPAN&gt;,&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Item:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;{}&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;However, none of these items are currently in Creatio and so the first four items should be being Created but for whatever reason they aren't. It has nothing to do with the item itself because if I change the ordering it's always only the last item being Created/Updated regardless of the values used.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Mar 2025 10:10:33 GMT</pubDate>
    <dc:creator>PhilipMasters</dc:creator>
    <dc:date>2025-03-20T10:10:33Z</dc:date>
    <item>
      <title>For Each Loop only loading in the final record in a Values array from a HTTP Get Request</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/for-each-loop-only-loading-in-the-final-record-in-a-values-array/m-p/9297#M3815</link>
      <description>&lt;P&gt;I have a HTTP Request that successfully retrieves some data and the format looks something like:&lt;BR /&gt;{&lt;BR /&gt;"Response": {&lt;BR /&gt;"_odata.context": "TEST",&lt;BR /&gt;"Value": [&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST0",&lt;BR /&gt;"C2_DESCRIPTION": "TEST0",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST0",&lt;BR /&gt;"C4_CREATED": "TEST0"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST1",&lt;BR /&gt;"C2_DESCRIPTION": "TEST1",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST1",&lt;BR /&gt;"C4_CREATED": "TEST1"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST2",&lt;BR /&gt;"C2_DESCRIPTION": "TEST2",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST2",&lt;BR /&gt;"C4_CREATED": "TEST2"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST3",&lt;BR /&gt;"C2_DESCRIPTION": "TEST3",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST3",&lt;BR /&gt;"C4_CREATED": "TEST3"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST4",&lt;BR /&gt;"C2_DESCRIPTION": "TEST4",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST4",&lt;BR /&gt;"C4_CREATED": "TEST4"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"C1_ORGANIZATION_ID": "TEST5",&lt;BR /&gt;"C2_DESCRIPTION": "TEST5",&lt;BR /&gt;"C3_REQUEST_SLA_TEMP_ID": "TEST5",&lt;BR /&gt;"C4_CREATED": "TEST5"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I then have a for each loop that loops through this Values array, I then perform a Search to Creatio and then Create/Update accordingly. However, for whatever reason only the final item in this array is actually Updated/Created in Creatio (I am only mapping the fields ORGANIZATION_ID and DESCRIPTION).&amp;nbsp;&lt;BR /&gt;It would seem that the Values array is being accepted and iterated through correctly as my output when testing the recipe is:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Index:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;5&lt;/SPAN&gt;,&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Is first:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;false&lt;/SPAN&gt;,&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Is last:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;true&lt;/SPAN&gt;,&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Item:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;{}&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;However, none of these items are currently in Creatio and so the first four items should be being Created but for whatever reason they aren't. It has nothing to do with the item itself because if I change the ordering it's always only the last item being Created/Updated regardless of the values used.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 10:10:33 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/for-each-loop-only-loading-in-the-final-record-in-a-values-array/m-p/9297#M3815</guid>
      <dc:creator>PhilipMasters</dc:creator>
      <dc:date>2025-03-20T10:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: For Each Loop only loading in the final record in a Values array from a HTTP Get Request</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/for-each-loop-only-loading-in-the-final-record-in-a-values-array/m-p/9299#M3816</link>
      <description>&lt;P&gt;I should add that within the recipe flow, within the For Each loop, I have two IF branches to determine whether or not this should be a Create or an Update action.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 10:24:23 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/for-each-loop-only-loading-in-the-final-record-in-a-values-array/m-p/9299#M3816</guid>
      <dc:creator>PhilipMasters</dc:creator>
      <dc:date>2025-03-20T10:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: For Each Loop only loading in the final record in a Values array from a HTTP Get Request</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/for-each-loop-only-loading-in-the-final-record-in-a-values-array/m-p/9300#M3817</link>
      <description>&lt;P&gt;Sorry, actually what's happening in the output of a Test is that the input to the Update is actually the first item in the For Each but the For Each Loop output is Index 5. So clearly the first item goes through the logic inside the For Each loop, the loop continues to iterate but isn't processing the records.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 10:36:31 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/for-each-loop-only-loading-in-the-final-record-in-a-values-array/m-p/9300#M3817</guid>
      <dc:creator>PhilipMasters</dc:creator>
      <dc:date>2025-03-20T10:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: For Each Loop only loading in the final record in a Values array from a HTTP Get Request</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/for-each-loop-only-loading-in-the-final-record-in-a-values-array/m-p/9301#M3818</link>
      <description>&lt;P&gt;Anyone who lands here I was being stupid. Make sure to use the data pill from for each not from http request lol.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 10:48:43 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/for-each-loop-only-loading-in-the-final-record-in-a-values-array/m-p/9301#M3818</guid>
      <dc:creator>PhilipMasters</dc:creator>
      <dc:date>2025-03-20T10:48:43Z</dc:date>
    </item>
  </channel>
</rss>

