<?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: How to get the desired results using Splunk Text Input? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412252#M72971</link>
    <description>&lt;P&gt;HI @mbasharat,&lt;/P&gt;

&lt;P&gt;Can you please share your code as I am having the same scenerio.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2020 06:14:32 GMT</pubDate>
    <dc:creator>raiqbal47010</dc:creator>
    <dc:date>2020-01-09T06:14:32Z</dc:date>
    <item>
      <title>How to get the desired results using Splunk Text Input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412248#M72967</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a dashboard. It has 3 text inputs.&lt;/P&gt;

&lt;P&gt;Search by IP&lt;BR /&gt;
Text Input 1 &lt;/P&gt;

&lt;P&gt;Search by NETBIOS&lt;BR /&gt;
Text Input 2&lt;/P&gt;

&lt;P&gt;Search by DNS&lt;BR /&gt;
Text Input 3     &lt;/P&gt;

&lt;P&gt;Submit button&lt;/P&gt;

&lt;P&gt;I have a statistical table panel below them that is running the query:&lt;/P&gt;

&lt;P&gt;Base search/Report reference&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search IP="$ip$" OR NETBIOS="$netbios$" OR DNS="$dns$"
| stats dc(IP) AS Total BY IP, NETBIOS, DNS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I have IP inserted, Submit returns IP, NETBIOS and DNS.&lt;BR /&gt;
When I have different NETBIOS inserted, search returns NETBIOS + IP (both different, one result for IP and one for NETBIOS. Likewise if I have all three different values, I will have three results)&lt;/P&gt;

&lt;P&gt;What I need:&lt;BR /&gt;
- Once any value is inserted, I want the other two to reset and become blank so search can use only one value at a time. I need to use either of the three values from text box inputs above and have only one result from one of either of three values. &lt;/P&gt;

&lt;P&gt;For example, if I insert an IP 00.00.00.00 and hit Submit, I get results for IP since other two values are left blank. But when I insert NETBIOS e.g. SAMPLENETBIOS, I want IP text box to become reset/blank and search result should return results for NETBIOS not IP. Likewise for DNS.&lt;/P&gt;

&lt;P&gt;Or can I have one text box where any one of three values can be inserted to get desired results? How? &lt;/P&gt;

&lt;P&gt;Thanks in-advance&lt;/P&gt;

&lt;P&gt;I am on v6.6.5 and +&lt;/P&gt;</description>
      <pubDate>Sat, 20 Apr 2019 21:33:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412248#M72967</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2019-04-20T21:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the desired results using Splunk Text Input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412249#M72968</link>
      <description>&lt;P&gt;You need to create a &lt;CODE&gt;change&lt;/CODE&gt; section for each one and inside of this, do a pair of &lt;CODE&gt;unset&lt;/CODE&gt; commands for each of the other 2 token names, like this (for the first token):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;unset token="second_token"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;unset token="form.second_token"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;unset token="third_token"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;unset token="form.third_token"&amp;gt;&amp;lt;/unset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 21 Apr 2019 16:21:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412249#M72968</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-21T16:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the desired results using Splunk Text Input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412250#M72969</link>
      <description>&lt;P&gt;Is it also possible to have more than one ORs in panel drilldown as below:&lt;/P&gt;

&lt;P&gt;Panel &amp;gt; Drill down &amp;gt; on Cell&lt;BR /&gt;
Cell value 1=IP&lt;BR /&gt;
Cell value 2=NETBIOS&lt;BR /&gt;
Cell value 3=DNS&lt;/P&gt;

&lt;P&gt;Drill down &amp;gt; Link to Dashboard&lt;BR /&gt;
Has three token under Manage Tokens.&lt;BR /&gt;
form.value &lt;EM&gt;("value" is the token of text box in the destination page)&lt;/EM&gt; = $row.IP$ OR $row.NETBIOS$ OR $row.DNS$&lt;BR /&gt;
This OR is not working as well as it is passing all three values separated by commas instead of only the one that is clicked on.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 18:04:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412250#M72969</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2019-04-21T18:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the desired results using Splunk Text Input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412251#M72970</link>
      <description>&lt;P&gt;Hey You cannot pass OR in drill down,&lt;BR /&gt;
instead, you can use the conditional drill down   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;condition field="IP"&amp;gt;
          &amp;lt;link target="_blank"&amp;gt;/app/search/handson_2?form.value=$row.IP$&amp;lt;/link&amp;gt;
          &amp;lt;/condition&amp;gt;
          &amp;lt;condition field="NETBIOS"&amp;gt;
            &amp;lt;link target="_blank"&amp;gt;/app/search/handson_2?form.value=$row.NETBIOS$&amp;lt;/link&amp;gt;
          &amp;lt;/condition&amp;gt;
               &amp;lt;condition field="DNS"&amp;gt;
            &amp;lt;link target="_blank"&amp;gt;/app/search/handson_2?form.value=$row.DNS$&amp;lt;/link&amp;gt;
          &amp;lt;/condition&amp;gt;
          &amp;lt;condition&amp;gt;
            &amp;lt;!-- No drilldown for other cell--&amp;gt;
          &amp;lt;/condition&amp;gt;
        &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here you can change the value of fieldname as per your requirements. &lt;BR /&gt;
In condition tag change field=&lt;STRONG&gt;fieldname&lt;/STRONG&gt;&lt;BR /&gt;
and in link tag just change $row.&lt;STRONG&gt;fieldname&lt;/STRONG&gt;$&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 05:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412251#M72970</guid>
      <dc:creator>riddhichandaran</dc:creator>
      <dc:date>2019-04-22T05:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the desired results using Splunk Text Input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412252#M72971</link>
      <description>&lt;P&gt;HI @mbasharat,&lt;/P&gt;

&lt;P&gt;Can you please share your code as I am having the same scenerio.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 06:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412252#M72971</guid>
      <dc:creator>raiqbal47010</dc:creator>
      <dc:date>2020-01-09T06:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the desired results using Splunk Text Input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412253#M72972</link>
      <description>&lt;P&gt;I ended up creating a text box as below with token and referenced the token value in the searches as sampled below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     &amp;lt;input type="text" token="value" searchWhenChanged="false"&amp;gt;
       &amp;lt;label&amp;gt;Search by IP or NETBIOS or DNS&amp;lt;/label&amp;gt;
       &amp;lt;default&amp;gt;00.00.00.00&amp;lt;/default&amp;gt;
     &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;search/base search for panels as per your use case:&lt;/P&gt;

&lt;P&gt;index=SAMPLE sourcetype=SAMPLE2&lt;BR /&gt;
*&lt;EM&gt;| search ip_address="$value$" OR netbios="$value$" OR dns="$value$"&lt;/EM&gt;&lt;BR /&gt;
REST OF THE SEARCH&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 13:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-desired-results-using-Splunk-Text-Input/m-p/412253#M72972</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-01-09T13:59:20Z</dc:date>
    </item>
  </channel>
</rss>

