<?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: Possible to set token values without displaying them? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Possible-to-set-token-values-without-displaying-them/m-p/326806#M160844</link>
    <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This article has all the details you need.&lt;/P&gt;

&lt;P&gt;You can create a dynamic drop down that populated the token but even if the user opens the the panel in search, they won't know what search created the token.  They will only see the value that was set.  That combined with using the _ method woodcock mentioned, should solve your problem.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jun 2017 12:34:40 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2017-06-05T12:34:40Z</dc:date>
    <item>
      <title>Possible to set token values without displaying them?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Possible-to-set-token-values-without-displaying-them/m-p/326804#M160842</link>
      <description>&lt;P&gt;So, basically I've a query which ends something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval uf = if(like(one_reason, "%unknown_failure%"), uf.thread_id, uf) 
| stats count by one_reason | sort -count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I'm displaying a field called &lt;CODE&gt;one_reason&lt;/CODE&gt; which &lt;EM&gt;can&lt;/EM&gt; take a value called &lt;CODE&gt;unknown_failure&lt;/CODE&gt; in which case I want the value of variable &lt;CODE&gt;uf&lt;/CODE&gt;.&lt;BR /&gt;
However I can't set token to &lt;CODE&gt;$uf$&lt;/CODE&gt;&lt;BR /&gt;
I've been accessing &lt;CODE&gt;one_reason&lt;/CODE&gt; as &lt;CODE&gt;$row.one_reason$&lt;/CODE&gt;&lt;BR /&gt;
Any way to access &lt;CODE&gt;uf&lt;/CODE&gt; without displaying it?&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2017 20:20:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Possible-to-set-token-values-without-displaying-them/m-p/326804#M160842</guid>
      <dc:creator>shrutigupta</dc:creator>
      <dc:date>2017-06-04T20:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to set token values without displaying them?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Possible-to-set-token-values-without-displaying-them/m-p/326805#M160843</link>
      <description>&lt;P&gt;Believe it or not, YES!  It is a little-known fact about Splunk that any field that starts with an underscore character ( &lt;CODE&gt;_&lt;/CODE&gt; ) will not be displayed on the &lt;CODE&gt;Statustics&lt;/CODE&gt; tab but it is still accessible (with the exception of &lt;CODE&gt;_time&lt;/CODE&gt; which is a very, VERY special field).  You can (not) see the invisibility like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_* 
| stats count BY sourcetype
| sort 0 - count
| streamstats count AS _serial
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then add this to prove that it really is there:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval serial=_serial
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval uf = if(like(one_reason, "%unknown_failure%"), uf.thread_id, uf) 
| stats count values(uf) AS _uf BY one_reason | sort 0 - count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or similar and then reference &lt;CODE&gt;$_uf$&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 05:16:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Possible-to-set-token-values-without-displaying-them/m-p/326805#M160843</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-05T05:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to set token values without displaying them?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Possible-to-set-token-values-without-displaying-them/m-p/326806#M160844</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This article has all the details you need.&lt;/P&gt;

&lt;P&gt;You can create a dynamic drop down that populated the token but even if the user opens the the panel in search, they won't know what search created the token.  They will only see the value that was set.  That combined with using the _ method woodcock mentioned, should solve your problem.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 12:34:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Possible-to-set-token-values-without-displaying-them/m-p/326806#M160844</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-06-05T12:34:40Z</dc:date>
    </item>
  </channel>
</rss>

