<?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 create a dashboard with a drop-down form where users can select fields from a CSV file to filter search results on indexed events? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-dashboard-with-a-drop-down-form-where-users-can/m-p/235824#M14616</link>
    <description>&lt;P&gt;First, create two dropdown. 1 with &lt;CODE&gt;token="div"&lt;/CODE&gt; second with &lt;CODE&gt;token="dept"&lt;/CODE&gt;. The queries for the two should be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="dropdown" token="div"&amp;gt;
&amp;lt;search&amp;gt;&amp;lt;query&amp;gt;| inputlookup csvfile.csv | fields DIVISION | dedup DIVISION | sort DIVISION&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;
...
&amp;lt;/input&amp;gt;

&amp;lt;input type="dropdown" token="dept"&amp;gt;
&amp;lt;search&amp;gt;&amp;lt;query&amp;gt;| inputlookup csvfile.csv | where DIVISION=$div$ | dedup dept | field dept | sort dept&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;
...
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then, add a table&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;table&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;index=foo sourcetype=bar | lookup csvfile.csv USERNAME AS  USER_NAME OUTPUT DIVISION DEPARTMENT  | where DEPARTMENT=$dept$ AND DIVISION=$div$ | table &amp;lt;&amp;lt;list of fields you would like to display&amp;gt;&amp;gt; &amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;@d&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
  &amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 22 Nov 2016 19:20:01 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-11-22T19:20:01Z</dc:date>
    <item>
      <title>How to create a dashboard with a drop-down form where users can select fields from a CSV file to filter search results on indexed events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-dashboard-with-a-drop-down-form-where-users-can/m-p/235823#M14615</link>
      <description>&lt;P&gt;I have logs that have information like the following&lt;/P&gt;

&lt;P&gt;BROWSER_TYPE&lt;BR /&gt;
USER_NAME&lt;BR /&gt;
IP Address&lt;/P&gt;

&lt;P&gt;I have a CSV file that I have uploaded, given Global permission.&lt;/P&gt;

&lt;P&gt;That CSV file contains:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FIRST_NAME  LAST_NAME   FULL_NAME   USER_ID USERNAME    EMAIL   WORKDOTCOM_USER User.Employee_Type__c   User.Group__c   DIVISION    DEPARTMENT  User.Business_Unit__c   User.Country__c PROFILE CREATED_DATE    LAST_UPDATE LAST_LOGIN
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I want to add to my Dashboard:&lt;BR /&gt;
In My dashboard, I want to add drop-down form so user can select DIVISION, DEPARTMENT from the csv and filter data accordingly&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:51:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-dashboard-with-a-drop-down-form-where-users-can/m-p/235823#M14615</guid>
      <dc:creator>splgeek</dc:creator>
      <dc:date>2020-09-29T11:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a dashboard with a drop-down form where users can select fields from a CSV file to filter search results on indexed events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-dashboard-with-a-drop-down-form-where-users-can/m-p/235824#M14616</link>
      <description>&lt;P&gt;First, create two dropdown. 1 with &lt;CODE&gt;token="div"&lt;/CODE&gt; second with &lt;CODE&gt;token="dept"&lt;/CODE&gt;. The queries for the two should be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="dropdown" token="div"&amp;gt;
&amp;lt;search&amp;gt;&amp;lt;query&amp;gt;| inputlookup csvfile.csv | fields DIVISION | dedup DIVISION | sort DIVISION&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;
...
&amp;lt;/input&amp;gt;

&amp;lt;input type="dropdown" token="dept"&amp;gt;
&amp;lt;search&amp;gt;&amp;lt;query&amp;gt;| inputlookup csvfile.csv | where DIVISION=$div$ | dedup dept | field dept | sort dept&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;
...
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then, add a table&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;table&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;index=foo sourcetype=bar | lookup csvfile.csv USERNAME AS  USER_NAME OUTPUT DIVISION DEPARTMENT  | where DEPARTMENT=$dept$ AND DIVISION=$div$ | table &amp;lt;&amp;lt;list of fields you would like to display&amp;gt;&amp;gt; &amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;@d&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
  &amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Nov 2016 19:20:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-dashboard-with-a-drop-down-form-where-users-can/m-p/235824#M14616</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-22T19:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a dashboard with a drop-down form where users can select fields from a CSV file to filter search results on indexed events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-dashboard-with-a-drop-down-form-where-users-can/m-p/235825#M14617</link>
      <description>&lt;P&gt;Thanks&lt;BR /&gt;
1st token Div was fine, it populated results in the dropdown&lt;/P&gt;

&lt;P&gt;2nd token dept did not work- wont populate anything. - I tried this too | inputlookup All_Users.csv | where DEPARTMENT=$dept$ | dedup DEPARTMENT| fields DEPARTMENT| sort DEPARTMENT&lt;/P&gt;

&lt;P&gt;also&lt;BR /&gt;
when you say Add Table, what do you mean by that&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 19:44:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-dashboard-with-a-drop-down-form-where-users-can/m-p/235825#M14617</guid>
      <dc:creator>splgeek</dc:creator>
      <dc:date>2016-11-22T19:44:30Z</dc:date>
    </item>
  </channel>
</rss>

