<?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: Iterate through an log record in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Iterate-through-an-log-record/m-p/261474#M1398</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Nov 2024 04:20:10 GMT</pubDate>
    <dc:creator>olgatimbur</dc:creator>
    <dc:date>2024-11-05T04:20:10Z</dc:date>
    <item>
      <title>Iterate through an log record</title>
      <link>https://community.dynatrace.com/t5/DQL/Iterate-through-an-log-record/m-p/261444#M1394</link>
      <description>&lt;P&gt;I am trying to determine a status of a scenario as passed/failed&lt;BR /&gt;| fieldsAdd status = event[steps]&lt;BR /&gt;Each step record can have a list of element and results:&lt;BR /&gt;example:&lt;BR /&gt;&lt;SPAN&gt;[ { "result": "passed", "error": "" },{ "name": "I login to profile", "result": "passed", "error": "" }, ]&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;i need to iterate through it, if any of the result is failed, the scenario will get a failed status&amp;nbsp;&lt;BR /&gt;else passed&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 17:40:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Iterate-through-an-log-record/m-p/261444#M1394</guid>
      <dc:creator>olgatimbur</dc:creator>
      <dc:date>2024-11-04T17:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through an log record</title>
      <link>https://community.dynatrace.com/t5/DQL/Iterate-through-an-log-record/m-p/261469#M1397</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/82722"&gt;@olgatimbur&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If all you need is whether or not there is a fail could you use the contains function as below?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| fieldsAdd status = if(contains(content, "\"result\": \"failed\""), "failed", else:"passed")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 01:57:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Iterate-through-an-log-record/m-p/261469#M1397</guid>
      <dc:creator>Fin_Ubels</dc:creator>
      <dc:date>2024-11-05T01:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through an log record</title>
      <link>https://community.dynatrace.com/t5/DQL/Iterate-through-an-log-record/m-p/261474#M1398</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 04:20:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Iterate-through-an-log-record/m-p/261474#M1398</guid>
      <dc:creator>olgatimbur</dc:creator>
      <dc:date>2024-11-05T04:20:10Z</dc:date>
    </item>
  </channel>
</rss>

