<?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: Nested variables in XSOAR ? Interpolation? in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/nested-variables-in-xsoar-interpolation/m-p/579632#M3130</link>
    <description>&lt;P&gt;Is the name of your ContextKey2 fixed or variable ?&lt;/P&gt;
&lt;P&gt;Because I do something similar at what you want :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;Context = {
  "ContextKey1":"qwerty",
  "ContextKey2":{
   "azerty":True,
   "qwerty":False
 }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I use transformer on the task argument&lt;/P&gt;
&lt;P&gt;Get : ContextKey2&lt;BR /&gt;transformat get field ${Key1}&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Otherwise if the ContextKey2 name can change, you need to write an automation to use the demisto.context() &lt;BR /&gt;Also I think your situation will be easier if you have "ContexKey1":Key instead of "ContexKey1":ContextKey2.Key&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2024 12:55:58 GMT</pubDate>
    <dc:creator>madani</dc:creator>
    <dc:date>2024-03-07T12:55:58Z</dc:date>
    <item>
      <title>Nested variables in XSOAR ? Interpolation?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/nested-variables-in-xsoar-interpolation/m-p/579537#M3128</link>
      <description>&lt;P&gt;I would like to use a Context key Value as a variable in a task, is this possible, or how are people accomplishing this in XSOAR?&amp;nbsp; Do i need to create a custom script? I saw someone else mention they were able to do something similar with Lists, but I am not sure how that would work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Example:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ContexKey1 : ContextKey2.Key&lt;/P&gt;
&lt;P&gt;ContextKey2.Key : NeededValue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my task I need to be able to reference ContextKey1 in a task, to get the value of ContextKey2.Key, which above = NeededValue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally the command : !Set key:Results value:${${ContextKey1}}&amp;nbsp;&lt;/P&gt;
&lt;P&gt;would produce : Results:NeededValue&lt;/P&gt;
&lt;P&gt;But that doesn't work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice would be appreciated, thanks&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 23:39:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/nested-variables-in-xsoar-interpolation/m-p/579537#M3128</guid>
      <dc:creator>kbratt</dc:creator>
      <dc:date>2024-03-06T23:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Nested variables in XSOAR ? Interpolation?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/nested-variables-in-xsoar-interpolation/m-p/579632#M3130</link>
      <description>&lt;P&gt;Is the name of your ContextKey2 fixed or variable ?&lt;/P&gt;
&lt;P&gt;Because I do something similar at what you want :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;Context = {
  "ContextKey1":"qwerty",
  "ContextKey2":{
   "azerty":True,
   "qwerty":False
 }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I use transformer on the task argument&lt;/P&gt;
&lt;P&gt;Get : ContextKey2&lt;BR /&gt;transformat get field ${Key1}&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Otherwise if the ContextKey2 name can change, you need to write an automation to use the demisto.context() &lt;BR /&gt;Also I think your situation will be easier if you have "ContexKey1":Key instead of "ContexKey1":ContextKey2.Key&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 12:55:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/nested-variables-in-xsoar-interpolation/m-p/579632#M3130</guid>
      <dc:creator>madani</dc:creator>
      <dc:date>2024-03-07T12:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Nested variables in XSOAR ? Interpolation?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/nested-variables-in-xsoar-interpolation/m-p/579703#M3132</link>
      <description>&lt;P&gt;Thanks for the response!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second Context key name does change, that is why I am passing it in as a value to the first Static Context Key name.&amp;nbsp;&lt;BR /&gt;The Second Context key is a result of a Task in the playbook, and it changes per incident but the value of ContextKey1 is passed in at incident creation time&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;ContextKey1 name is static, and it will contain the path to the second context key that I need (which changes per incident)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;Example 1: 
Context = {
  "ContextKey1":"Search.Results.User",
  "Search.Results.User":"usernameexample"
 }

Example 2: 
Context = {
  "ContextKey1":"Search.Results.Computer",
  "Search.Results.Computer":"computernameexamle"
 }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I need to be able to build a playbook that will have a task that looks at "ContextKey1", but it will pull the value from Search.Results.User in Example incident 1 and Search.Results.Computer in Example incident 2.&amp;nbsp; &lt;BR /&gt;Hope that makes sense.&amp;nbsp;&lt;BR /&gt;I think I have this working in a custom script, so may just go that way.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 19:56:03 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/nested-variables-in-xsoar-interpolation/m-p/579703#M3132</guid>
      <dc:creator>kbratt</dc:creator>
      <dc:date>2024-03-07T19:56:03Z</dc:date>
    </item>
  </channel>
</rss>

