<?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 How do I pass a dictionary into a Format Code Block - error in expanding in Splunk SOAR</title>
    <link>https://community.splunk.com/t5/Splunk-SOAR/How-do-I-pass-a-dictionary-into-a-Format-Code-Block-error-in/m-p/640721#M1170</link>
    <description>&lt;P&gt;Hello - I'm trying to pass a dictionary into a format code block:&lt;BR /&gt;&lt;BR /&gt;for example:&lt;BR /&gt;my_dict = {"hello":"world", "foo":"bar"}&lt;/P&gt;
&lt;P&gt;and in the format code block i have:&lt;BR /&gt;&lt;BR /&gt;Contents of dictionary:&lt;BR /&gt;{0}&lt;/P&gt;
&lt;P&gt;where 0 is mycodeblockname:custom_function:my_dict.hello&lt;/P&gt;
&lt;P&gt;and I receive a "error in expanding mycodeblockname:custom_function:my_dict.hello" message. I also tried using :, 0.hello, etc and it hasnt worked. Any suggestions are appreciated. i know that if I pass a dictionary or list from an action block then this works but a custom function doesnt work from what i can see&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2023 17:23:57 GMT</pubDate>
    <dc:creator>nongingerale</dc:creator>
    <dc:date>2023-04-21T17:23:57Z</dc:date>
    <item>
      <title>How do I pass a dictionary into a Format Code Block - error in expanding</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/How-do-I-pass-a-dictionary-into-a-Format-Code-Block-error-in/m-p/640721#M1170</link>
      <description>&lt;P&gt;Hello - I'm trying to pass a dictionary into a format code block:&lt;BR /&gt;&lt;BR /&gt;for example:&lt;BR /&gt;my_dict = {"hello":"world", "foo":"bar"}&lt;/P&gt;
&lt;P&gt;and in the format code block i have:&lt;BR /&gt;&lt;BR /&gt;Contents of dictionary:&lt;BR /&gt;{0}&lt;/P&gt;
&lt;P&gt;where 0 is mycodeblockname:custom_function:my_dict.hello&lt;/P&gt;
&lt;P&gt;and I receive a "error in expanding mycodeblockname:custom_function:my_dict.hello" message. I also tried using :, 0.hello, etc and it hasnt worked. Any suggestions are appreciated. i know that if I pass a dictionary or list from an action block then this works but a custom function doesnt work from what i can see&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 17:23:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/How-do-I-pass-a-dictionary-into-a-Format-Code-Block-error-in/m-p/640721#M1170</guid>
      <dc:creator>nongingerale</dc:creator>
      <dc:date>2023-04-21T17:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Format Code Block - error in expanding</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/How-do-I-pass-a-dictionary-into-a-Format-Code-Block-error-in/m-p/640769#M1171</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/253030"&gt;@nongingerale&lt;/a&gt;&amp;nbsp;there are a few possibilities why this might not be working. I tested it and it worked as expected for me so here is how i tested it:&lt;BR /&gt;&lt;BR /&gt;Created a CF with a dict output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="phanTom_0-1681978224049.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24998i1CD0A868A76890D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="phanTom_0-1681978224049.png" alt="phanTom_0-1681978224049.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Built a scratch playbook to use the CF:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="phanTom_1-1681978299997.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24999i336BBFF45AE7360E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="phanTom_1-1681978299997.png" alt="phanTom_1-1681978299997.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then outputted the value to a comment:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="phanTom_2-1681978336120.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/25000i83946EC71E0FE5CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="phanTom_2-1681978336120.png" alt="phanTom_2-1681978336120.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hopefully something in there may help point out the issue.&lt;BR /&gt;&lt;BR /&gt;-- If this solved your issue please mark as a solution for others. Happy SOARing --&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 08:12:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/How-do-I-pass-a-dictionary-into-a-Format-Code-Block-error-in/m-p/640769#M1171</guid>
      <dc:creator>phanTom</dc:creator>
      <dc:date>2023-04-20T08:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Format Code Block - error in expanding</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/How-do-I-pass-a-dictionary-into-a-Format-Code-Block-error-in/m-p/640829#M1172</link>
      <description>&lt;P&gt;thanks! that worked once i created a custom function (as opposed to passing the dictionary from a custom code block).&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 12:54:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/How-do-I-pass-a-dictionary-into-a-Format-Code-Block-error-in/m-p/640829#M1172</guid>
      <dc:creator>nongingerale</dc:creator>
      <dc:date>2023-04-20T12:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Format Code Block - error in expanding</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/How-do-I-pass-a-dictionary-into-a-Format-Code-Block-error-in/m-p/640831#M1173</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/253030"&gt;@nongingerale&lt;/a&gt;&amp;nbsp;yeah the Code Blocks have never been able to have nested JSON understood downstream. Only the new Custom Functions can as it can be a way to get around the limit of 10 outputs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for marking as a solution!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 12:59:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/How-do-I-pass-a-dictionary-into-a-Format-Code-Block-error-in/m-p/640831#M1173</guid>
      <dc:creator>phanTom</dc:creator>
      <dc:date>2023-04-20T12:59:30Z</dc:date>
    </item>
  </channel>
</rss>

