<?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: Use DT format inside an automation. in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/use-dt-format-inside-an-automation/m-p/560349#M2678</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/226640"&gt;@Josep&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Can you please try the below dt statement?&lt;BR /&gt;&lt;BR /&gt;field1_values = demisto.dt(upField, 'field1')&lt;BR /&gt;&lt;BR /&gt;I hope it solves your problem!&lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2023 11:29:40 GMT</pubDate>
    <dc:creator>gyldz</dc:creator>
    <dc:date>2023-10-03T11:29:40Z</dc:date>
    <item>
      <title>Use DT format inside an automation.</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/use-dt-format-inside-an-automation/m-p/560347#M2676</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;We are working on an automation which calls many different lists of nested dicts. Example:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;upField:&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;0:&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-90px"&gt;&lt;EM&gt;field1:value1&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-90px"&gt;&lt;EM&gt;field2: value2&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;1:&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-90px"&gt;&lt;EM&gt;field1:value3&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-90px"&gt;&lt;EM&gt;field2: value4&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-90px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a playbook it will be easy to call only field1 using this expression: ${upField.field1} . It will create an array with these values:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;[value1, value3]&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;However, if we want to get these values in an automation, a loop "for" has to be created to go over each dict of the list. Turning into a tedious, heavy and not flexible automation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To avoid this, we tried unsuccessfully to use the commands "demisto.executeCommand("jmespath",{})" and "demisto.executeCommand("demisto.dt()",{})".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can we achieve a simple command similar to "${}" in an automation?&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 10:47:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/use-dt-format-inside-an-automation/m-p/560347#M2676</guid>
      <dc:creator>Josep</dc:creator>
      <dc:date>2023-10-03T10:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Use DT format inside an automation.</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/use-dt-format-inside-an-automation/m-p/560349#M2678</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/226640"&gt;@Josep&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Can you please try the below dt statement?&lt;BR /&gt;&lt;BR /&gt;field1_values = demisto.dt(upField, 'field1')&lt;BR /&gt;&lt;BR /&gt;I hope it solves your problem!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 11:29:40 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/use-dt-format-inside-an-automation/m-p/560349#M2678</guid>
      <dc:creator>gyldz</dc:creator>
      <dc:date>2023-10-03T11:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Use DT format inside an automation.</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/use-dt-format-inside-an-automation/m-p/560352#M2679</link>
      <description>&lt;P&gt;You are the best &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/287891"&gt;@gyldz&lt;/a&gt;, it worked.&lt;/P&gt;
&lt;P&gt;The nested dict was deeper, I show you the full commnand to solve it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Data = demisto.get(demisto.context(),"Data")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;field1_values = demisto.dt(Data, 'upField.midField.downField')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 12:03:48 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/use-dt-format-inside-an-automation/m-p/560352#M2679</guid>
      <dc:creator>Josep</dc:creator>
      <dc:date>2023-10-03T12:03:48Z</dc:date>
    </item>
  </channel>
</rss>

