<?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 Custom Fields not showing in context data in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550011#M2348</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two custom fields. Initially, these fields were added to the context data even if they are empty. Now, they don't get added at all. This code used to work &lt;CODE&gt; demisto.incident()['customFields']['fieldhere']&lt;/CODE&gt; to grab the custom fields, but now it returns a &lt;CODE&gt;KeyError&lt;/CODE&gt; error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice?&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jul 2023 14:25:22 GMT</pubDate>
    <dc:creator>ssarangaya</dc:creator>
    <dc:date>2023-07-19T14:25:22Z</dc:date>
    <item>
      <title>Custom Fields not showing in context data</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550011#M2348</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two custom fields. Initially, these fields were added to the context data even if they are empty. Now, they don't get added at all. This code used to work &lt;CODE&gt; demisto.incident()['customFields']['fieldhere']&lt;/CODE&gt; to grab the custom fields, but now it returns a &lt;CODE&gt;KeyError&lt;/CODE&gt; error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 14:25:22 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550011#M2348</guid>
      <dc:creator>ssarangaya</dc:creator>
      <dc:date>2023-07-19T14:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Fields not showing in context data</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550014#M2349</link>
      <description>&lt;P&gt;It should be demisto.incident()['CustomFields']['fieldname']&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can always print each get to make sure your getting what you think you're getting.&amp;nbsp; I.e print(demisto.incident()['CustomFields'])&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In regards to the fields, were the custom fields added after the Incident was created?&amp;nbsp; If so they won't be in the incident object as they didn't exist at the time of creation, you'll need to use the setIncident builtin command to add a value to make them appear.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's a new Incident, make sure the fields are associated with the Incident Type or all Types before creation.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 14:45:47 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550014#M2349</guid>
      <dc:creator>MBeauchamp2</dc:creator>
      <dc:date>2023-07-19T14:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Fields not showing in context data</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550016#M2351</link>
      <description>&lt;P&gt;Ah, that's right! I did have 'CustomFields', but it still returns a KeyError. The fields are added to all incident types. Initially, I didn't need to set these fields. I could just access them via that code. But now it's not working. They are not showing in new incidents.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 15:04:02 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550016#M2351</guid>
      <dc:creator>ssarangaya</dc:creator>
      <dc:date>2023-07-19T15:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Fields not showing in context data</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550018#M2352</link>
      <description>&lt;P&gt;Is the field perhaps restricted to specific Incident Types?&amp;nbsp; And the Incident you are testing on isn't one of those?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 15:10:48 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550018#M2352</guid>
      <dc:creator>MBeauchamp2</dc:creator>
      <dc:date>2023-07-19T15:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Fields not showing in context data</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550025#M2353</link>
      <description>&lt;P&gt;I don't think so. The 'Add to all incident types' is checked.&lt;/P&gt;
&lt;P&gt;What I'm trying to do is check if the field is empty or not. If it's empty, add a value. But I'm unable to do this because when I check for the field, I get a KeyError error. (FYI: I'm trying to do these things via automation)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 15:37:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550025#M2353</guid>
      <dc:creator>ssarangaya</dc:creator>
      <dc:date>2023-07-19T15:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Fields not showing in context data</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550060#M2354</link>
      <description>&lt;P&gt;fixed with&amp;nbsp; &lt;CODE&gt;date_ack = demisto.incident()['CustomFields'].get('dateacknowledged')&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 19:10:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-fields-not-showing-in-context-data/m-p/550060#M2354</guid>
      <dc:creator>ssarangaya</dc:creator>
      <dc:date>2023-07-19T19:10:52Z</dc:date>
    </item>
  </channel>
</rss>

