<?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: How can I access the &amp;quot;loop&amp;quot; variable in my workflow task? in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221595#M469</link>
    <description>&lt;P&gt;Hey this works for me. I am able to access this Loop item values. I also tried string instead of integer like,&amp;nbsp; item&amp;nbsp; &amp;nbsp;['USA', 'UK].&lt;BR /&gt;&lt;BR /&gt;Now I have little more addition. If&amp;nbsp; I have item values like ,&lt;BR /&gt;item&amp;nbsp; [{&lt;STRONG&gt;Country&lt;/STRONG&gt; : 'India', &lt;STRONG&gt;Code&lt;/STRONG&gt;: '100'} ,{&lt;STRONG&gt;Country&lt;/STRONG&gt; : 'USA', &lt;STRONG&gt;Code&lt;/STRONG&gt;: '200'}]&lt;BR /&gt;&lt;BR /&gt;How Can I access this Country and Code values in JS code?? I tried&amp;nbsp; like below but got an error&lt;BR /&gt;&amp;nbsp; &amp;nbsp; console.log('Loop item' , actionExe.loopItem.Country);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; console.log('Loop item' , actionExe.loopItem.Code);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 06:28:31 GMT</pubDate>
    <dc:creator>heramb_sawant</dc:creator>
    <dc:date>2023-08-25T06:28:31Z</dc:date>
    <item>
      <title>How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/200188#M69</link>
      <description>&lt;P&gt;Hello team,&lt;BR /&gt;&lt;BR /&gt;I have a workflow action where I want to loop over an array of locations (lat, long)&lt;BR /&gt;I named the item variable "locations" and the list would look something like this.&lt;BR /&gt;[{lat: 48.29226713, long: 14.29553878}]&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;How can I access these values in my HTTP Request?&lt;BR /&gt;&lt;BR /&gt;EDIT: I have tried writing&amp;nbsp;{{locations.lat}} but it doesn't seem to work this way.&lt;BR /&gt;&lt;BR /&gt;EDIT_2: Figured out that my value for the list was malformed (invalid json). Using [{ "lat": 48.29226713, "long": 14.29553878}] works but still don't know who to read those values&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 07:56:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/200188#M69</guid>
      <dc:creator>dt_martin</dc:creator>
      <dc:date>2023-04-20T07:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/200200#M71</link>
      <description>&lt;P&gt;Hi Martin,&lt;BR /&gt;&lt;SPAN&gt;To access loop variable with e.g. its name set to&amp;nbsp;locations. You can access it like&amp;nbsp;{{ _.locations.lat }}&amp;nbsp;(mind the&amp;nbsp;_.&amp;nbsp;at the beginning)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-12-12 11_27_08-Clipboard.png" style="width: 786px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/8931iFBECC54308CFFB8F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-12-12 11_27_08-Clipboard.png" alt="2022-12-12 11_27_08-Clipboard.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-12-12 11_34_10-Clipboard.png" style="width: 773px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/8935i835811998BCEF390/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-12-12 11_34_10-Clipboard.png" alt="2022-12-12 11_34_10-Clipboard.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 10:35:25 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/200200#M71</guid>
      <dc:creator>michal_zawislak</dc:creator>
      <dc:date>2022-12-12T10:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221471#M463</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;BR /&gt;I want to do the same thing but in my case task is JS code. So How I can access this loop variable (added to my js code task) in my js code, how should be the syntax, please help.&lt;BR /&gt;&lt;BR /&gt;I referred&amp;nbsp; above example, but got an error in js code.&lt;BR /&gt;console.log({{ _.localtions.lat }});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also ,is there&amp;nbsp; a way to access the task loop counter inside task(JS code)??&lt;BR /&gt;Regards,&lt;BR /&gt;Heramb Sawant&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 07:04:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221471#M463</guid>
      <dc:creator>heramb_sawant</dc:creator>
      <dc:date>2023-08-24T07:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221482#M464</link>
      <description>&lt;P&gt;Hi Heramb,&lt;/P&gt;&lt;P&gt;To access the loop item in the "Run Javascript" task, I'd suggest using&amp;nbsp;&lt;A href="https://developer.dynatrace.com/reference/sdks/automation-utils/#action-execution-utilities-example" target="_blank" rel="noopener"&gt;automation-utils SDK&lt;/A&gt;&amp;nbsp;as it would be the simplest and fastest way.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michal_zawislak_0-1692862045894.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13779i9327741553DF5156/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michal_zawislak_0-1692862045894.png" alt="michal_zawislak_0-1692862045894.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michal_zawislak_1-1692862056328.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13780i5F2A1DE5F9B8B048/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michal_zawislak_1-1692862056328.png" alt="michal_zawislak_1-1692862056328.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michal_zawislak_2-1692862060439.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13781i57C2D0B8FF7F6424/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michal_zawislak_2-1692862060439.png" alt="michal_zawislak_2-1692862060439.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I hope this will help. If you have any more questions, don't hesitate to reach out.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 07:30:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221482#M464</guid>
      <dc:creator>michal_zawislak</dc:creator>
      <dc:date>2023-08-24T07:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221595#M469</link>
      <description>&lt;P&gt;Hey this works for me. I am able to access this Loop item values. I also tried string instead of integer like,&amp;nbsp; item&amp;nbsp; &amp;nbsp;['USA', 'UK].&lt;BR /&gt;&lt;BR /&gt;Now I have little more addition. If&amp;nbsp; I have item values like ,&lt;BR /&gt;item&amp;nbsp; [{&lt;STRONG&gt;Country&lt;/STRONG&gt; : 'India', &lt;STRONG&gt;Code&lt;/STRONG&gt;: '100'} ,{&lt;STRONG&gt;Country&lt;/STRONG&gt; : 'USA', &lt;STRONG&gt;Code&lt;/STRONG&gt;: '200'}]&lt;BR /&gt;&lt;BR /&gt;How Can I access this Country and Code values in JS code?? I tried&amp;nbsp; like below but got an error&lt;BR /&gt;&amp;nbsp; &amp;nbsp; console.log('Loop item' , actionExe.loopItem.Country);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; console.log('Loop item' , actionExe.loopItem.Code);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 06:28:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221595#M469</guid>
      <dc:creator>heramb_sawant</dc:creator>
      <dc:date>2023-08-25T06:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221598#M470</link>
      <description>&lt;P&gt;Glad it works!&lt;/P&gt;&lt;P&gt;Yes, you can also access object attributes. Your example is almost correct. There's a little thing missing: a reference to the "loop item".&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;console.log('Loop item' , actionExe.loopItem.item.Country);&lt;BR /&gt;&lt;/SPAN&gt;                                            ^^^^^^&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 06:53:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221598#M470</guid>
      <dc:creator>michal_zawislak</dc:creator>
      <dc:date>2023-08-25T06:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221605#M471</link>
      <description>&lt;P&gt;Thanks , Now I am able to access Object attributes as well.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 08:08:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221605#M471</guid>
      <dc:creator>heramb_sawant</dc:creator>
      <dc:date>2023-08-25T08:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221606#M472</link>
      <description>&lt;P&gt;The loop list must be a valid Python syntax, for example&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;[{"Country": "India", "Code": "100"}, {"Country": "USA", "Code": "200"}]&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 08:07:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221606#M472</guid>
      <dc:creator>michal_zawislak</dc:creator>
      <dc:date>2023-08-25T08:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221609#M473</link>
      <description>&lt;P&gt;Yes I understood that now.&lt;BR /&gt;&lt;BR /&gt;Hey I am not yet good with JS scripting &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; Can I write the same JS code(code to access item object attributes) in standard JS code user task ( please refer below image for the same)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="heramb_sawant_0-1692952608862.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13805i8B03FA9ECFD102EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="heramb_sawant_0-1692952608862.png" alt="heramb_sawant_0-1692952608862.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 08:39:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221609#M473</guid>
      <dc:creator>heramb_sawant</dc:creator>
      <dc:date>2023-08-25T08:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221611#M474</link>
      <description>&lt;P&gt;Hey I am able to do that , I am good for now&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="heramb_sawant_0-1692953548113.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13806iC3A63CD1F2EF8373/image-size/medium?v=v2&amp;amp;px=400" role="button" title="heramb_sawant_0-1692953548113.png" alt="heramb_sawant_0-1692953548113.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 08:53:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/221611#M474</guid>
      <dc:creator>heramb_sawant</dc:creator>
      <dc:date>2023-08-25T08:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access the "loop" variable in my workflow task?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/289900#M1594</link>
      <description>&lt;P&gt;can we able to use loop item in DQL ?&amp;nbsp;&lt;BR /&gt;&amp;nbsp;here is my usecase: first step is to load data from a lookup file, once data is retrieved, for every record, i need to make a DQL call to get metrics and if there is an anomaly, i need to create a problem ticket. kind of lookup functionality.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 18:24:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/How-can-I-access-the-quot-loop-quot-variable-in-my-workflow-task/m-p/289900#M1594</guid>
      <dc:creator>avinashpodisett</dc:creator>
      <dc:date>2025-11-19T18:24:15Z</dc:date>
    </item>
  </channel>
</rss>

