<?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: Using eval to set token in drilldown does not work in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-eval-to-set-token-in-drilldown-does-not-work/m-p/329110#M97961</link>
    <description>&lt;P&gt;You have a syntax issue with a missing parenthesis. Try this where you don't use the single quotes and add the closing parenthesis.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;eval token="dmp"&amp;gt;if(isnull($row.DMPrice$), &amp;amp;quot;N/A&amp;amp;quot;, $row.DMPrice$)&amp;lt;/eval&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2017 12:42:54 GMT</pubDate>
    <dc:creator>rjthibod</dc:creator>
    <dc:date>2017-06-07T12:42:54Z</dc:date>
    <item>
      <title>Using eval to set token in drilldown does not work</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-eval-to-set-token-in-drilldown-does-not-work/m-p/329109#M97960</link>
      <description>&lt;P&gt;I have a row in a table called DMPrice&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;set token="dmp"&amp;gt;$row.DMPrice$&amp;lt;/set&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this works, however, if there is no DMPrice value, then the token ends up being shown as null in another html panel.&lt;/P&gt;

&lt;P&gt;So I tried this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;eval token="dmp"&amp;gt;if(isnull('$row.DMPrice$',"N/A",'$row.DMPrice$')&amp;lt;/eval&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;both with and without the '' round the row var, but all I get in the html panel is $dmp$, which is what I have in the panel, i.e. referring to the token, so clearly it's not being set at all. What I wanted it to be was N/A if it's null, but no joy.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 12:25:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-eval-to-set-token-in-drilldown-does-not-work/m-p/329109#M97960</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2017-06-07T12:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using eval to set token in drilldown does not work</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-eval-to-set-token-in-drilldown-does-not-work/m-p/329110#M97961</link>
      <description>&lt;P&gt;You have a syntax issue with a missing parenthesis. Try this where you don't use the single quotes and add the closing parenthesis.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;eval token="dmp"&amp;gt;if(isnull($row.DMPrice$), &amp;amp;quot;N/A&amp;amp;quot;, $row.DMPrice$)&amp;lt;/eval&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 12:42:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-eval-to-set-token-in-drilldown-does-not-work/m-p/329110#M97961</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-06-07T12:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using eval to set token in drilldown does not work</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-eval-to-set-token-in-drilldown-does-not-work/m-p/329111#M97962</link>
      <description>&lt;P&gt;Sorry for the late response, only managed to revisit this. That worked nicely thanks. I always miss brackets with eval clauses and can never see them.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2017 05:15:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-eval-to-set-token-in-drilldown-does-not-work/m-p/329111#M97962</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2017-06-16T05:15:55Z</dc:date>
    </item>
  </channel>
</rss>

