<?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: Complete search string based on a drop down in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31872#M1371</link>
    <description>&lt;P&gt;The token is substituted into the search string. So if the token is $var$, you could simply put it in the search template (of the XML) as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;searchTemplate&amp;gt;
    index=$var$ | top $var$_user
 &amp;lt;/searchTemplate&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should work...&lt;/P&gt;</description>
    <pubDate>Fri, 10 Aug 2012 13:45:28 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2012-08-10T13:45:28Z</dc:date>
    <item>
      <title>Complete search string based on a drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31871#M1370</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;lets say I have a drop down with "red" and "green".&lt;BR /&gt;
If I choose red the search should look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=red | top red_user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I chosse green the search should look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=green | top green_user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Normally it is not a problem to use the token from the drop down in a search, but how can I handle it if the complete search should changing after choosing a field in the drop down?&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 13:40:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31871#M1370</guid>
      <dc:creator>nebel</dc:creator>
      <dc:date>2012-08-10T13:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Complete search string based on a drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31872#M1371</link>
      <description>&lt;P&gt;The token is substituted into the search string. So if the token is $var$, you could simply put it in the search template (of the XML) as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;searchTemplate&amp;gt;
    index=$var$ | top $var$_user
 &amp;lt;/searchTemplate&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should work...&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 13:45:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31872#M1371</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-08-10T13:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Complete search string based on a drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31873#M1372</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;this was just an easy example, my searches are more complicated with regex and stuff. I think I have to replace the complete search based on the drop down.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 13:48:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31873#M1372</guid>
      <dc:creator>nebel</dc:creator>
      <dc:date>2012-08-10T13:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Complete search string based on a drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31874#M1373</link>
      <description>&lt;P&gt;does nobody know how I can change the full search string by choosing a field in a drop down?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2012 14:00:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31874#M1373</guid>
      <dc:creator>nebel</dc:creator>
      <dc:date>2012-08-29T14:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Complete search string based on a drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31875#M1374</link>
      <description>&lt;P&gt;Create a macro for each case. In the drop-down, put the name of the macro for the value that corresponds to each choice.&lt;/P&gt;

&lt;P&gt;The search template then could be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;searchtemplate&amp;gt;
    `$var$`
&amp;lt;/searchtemplate&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That's the best that I can come up with. Plus it gives you the flexibility to change the macro without changing the dashboard.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2012 17:18:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31875#M1374</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-08-29T17:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Complete search string based on a drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31876#M1375</link>
      <description>&lt;P&gt;thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2012 13:53:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Complete-search-string-based-on-a-drop-down/m-p/31876#M1375</guid>
      <dc:creator>nebel</dc:creator>
      <dc:date>2012-08-30T13:53:26Z</dc:date>
    </item>
  </channel>
</rss>

