<?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: Unable to populate dropdown dynamically using PostProcess Search. Error: &amp;quot;Could not create search&amp;quot; in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149003#M9036</link>
    <description>&lt;P&gt;There is a detailed example with the correct format in the documentation here: &lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/Buildandeditforms#Create_a_form_with_a_global_search"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/Buildandeditforms#Create_a_form_with_a_global_search&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Using your example code and the documentation the the correct syntax would look something like this (not tested).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;search id="baseSearch"&amp;gt;
   &amp;lt;query&amp;gt;|inputlookup music2.csv | stats count by artist_name&amp;lt;/query&amp;gt;
 &amp;lt;/search&amp;gt;
 &amp;lt;fieldset autoRun="true" submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="tok_artist_name"&amp;gt;
      &amp;lt;label&amp;gt;Select Artist&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;R*&amp;lt;/default&amp;gt;
      &amp;lt;choice value="search artist_name="R*""&amp;gt;R*&amp;lt;/choice&amp;gt;
      ... etc ...

    &amp;lt;/input&amp;gt; 

 &amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 03 Aug 2015 05:35:48 GMT</pubDate>
    <dc:creator>gcato</dc:creator>
    <dc:date>2015-08-03T05:35:48Z</dc:date>
    <item>
      <title>Unable to populate dropdown dynamically using PostProcess Search. Error: "Could not create search"</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149002#M9035</link>
      <description>&lt;P&gt;For my music2.csv file with content as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"artist_name","track_name"
Rihanna,"You Da One"
Rihanna,"We Found Love"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to load dropdown with the distinct artist_names using a basesearch and post-process search as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Error Macro Dashboard&amp;lt;/label&amp;gt;
  &amp;lt;search id="baseSearch"&amp;gt;
    &amp;lt;query&amp;gt;|inputlookup music2.csv | stats count by artist_name&amp;lt;/query&amp;gt;
  &amp;lt;/search&amp;gt;
&amp;lt;fieldset autoRun="true" submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="tok_artist_name"&amp;gt;
      &amp;lt;label&amp;gt;Select Artist&amp;lt;/label&amp;gt;
      &amp;lt;search base="baseSearch"&amp;gt;
        &amp;lt;query&amp;gt;search artist_name="R*"&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;artist_name&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;artist_name&amp;lt;/fieldForValue&amp;gt;
    &amp;lt;/input&amp;gt;
&amp;lt;/fieldset&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But on screen the dropdown doesn't populate with any values and below dropdown an error msg is show as:&lt;BR /&gt;
Could not create search.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2015 04:57:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149002#M9035</guid>
      <dc:creator>ishangajera</dc:creator>
      <dc:date>2015-07-31T04:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to populate dropdown dynamically using PostProcess Search. Error: "Could not create search"</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149003#M9036</link>
      <description>&lt;P&gt;There is a detailed example with the correct format in the documentation here: &lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/Buildandeditforms#Create_a_form_with_a_global_search"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/Buildandeditforms#Create_a_form_with_a_global_search&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Using your example code and the documentation the the correct syntax would look something like this (not tested).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;search id="baseSearch"&amp;gt;
   &amp;lt;query&amp;gt;|inputlookup music2.csv | stats count by artist_name&amp;lt;/query&amp;gt;
 &amp;lt;/search&amp;gt;
 &amp;lt;fieldset autoRun="true" submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="tok_artist_name"&amp;gt;
      &amp;lt;label&amp;gt;Select Artist&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;R*&amp;lt;/default&amp;gt;
      &amp;lt;choice value="search artist_name="R*""&amp;gt;R*&amp;lt;/choice&amp;gt;
      ... etc ...

    &amp;lt;/input&amp;gt; 

 &amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Aug 2015 05:35:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149003#M9036</guid>
      <dc:creator>gcato</dc:creator>
      <dc:date>2015-08-03T05:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to populate dropdown dynamically using PostProcess Search. Error: "Could not create search"</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149004#M9037</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Actually I want the dropdown with distinct artist_names from the output of basesearch.&lt;BR /&gt;
The above solution will populate dropdown with single item as "R*"&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2015 06:18:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149004#M9037</guid>
      <dc:creator>ishangajera</dc:creator>
      <dc:date>2015-08-03T06:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to populate dropdown dynamically using PostProcess Search. Error: "Could not create search"</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149005#M9038</link>
      <description>&lt;P&gt;If You want to Display Dynamically you have to mention something in Query you are just searching search artist_name="R*" &lt;/P&gt;

&lt;P&gt;so as per my view search artist_name="R*"|stats count by artist_name know you will get the list of Artists names starts with R &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:52:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149005#M9038</guid>
      <dc:creator>lavanyaanne</dc:creator>
      <dc:date>2020-09-29T06:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to populate dropdown dynamically using PostProcess Search. Error: "Could not create search"</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149006#M9039</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;The data is not the issue, the issue is my dropdown is not accepting base search as I have done in my first post. It is expecting full search query.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2015 12:53:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149006#M9039</guid>
      <dc:creator>ishangajera</dc:creator>
      <dc:date>2015-08-03T12:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to populate dropdown dynamically using PostProcess Search. Error: "Could not create search"</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149007#M9040</link>
      <description>&lt;P&gt;Okay, I see what you mean now.  I couldn't get it to work either until I added a Submit button, then it populated okay.  I'm sure there's a good reason why.&lt;/P&gt;

&lt;P&gt;Here's the code I used (with Submit) that worked. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Artist Name&amp;lt;/label&amp;gt;
  &amp;lt;search id="baseSearch"&amp;gt;
    &amp;lt;query&amp;gt;|inputlookup music2.csv |stats values(artist_name) as artist_name, list(track_name) as track_name, count as count_artist_tracks&amp;lt;/query&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;fieldset submitButton="true" autoRun="true"&amp;gt;
    &amp;lt;input type="dropdown" token="tok_artist_name" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select Artist&amp;lt;/label&amp;gt;
      &amp;lt;search base="baseSearch"&amp;gt;
        &amp;lt;query&amp;gt;fields artist_name |sort artist name&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;artist_name&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;artist_name&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search base="baseSearch"&amp;gt;
          &amp;lt;query&amp;gt;search artist_name=$tok_artist_name|s$ |table *&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You may be aware already, but watch out for the 10k limit on global and post-searches.  &lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2015 22:07:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149007#M9040</guid>
      <dc:creator>gcato</dc:creator>
      <dc:date>2015-08-03T22:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to populate dropdown dynamically using PostProcess Search. Error: "Could not create search"</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149008#M9041</link>
      <description>&lt;P&gt;plz refer splunk Doc &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.4/AdvancedDev/PostProcess"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.4/AdvancedDev/PostProcess&lt;/A&gt; &lt;BR /&gt;
there may be some limitations in display the result of post process search&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2015 05:39:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149008#M9041</guid>
      <dc:creator>lavanyaanne</dc:creator>
      <dc:date>2015-08-04T05:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to populate dropdown dynamically using PostProcess Search. Error: "Could not create search"</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149009#M9042</link>
      <description>&lt;P&gt;Thanks Lavanya.&lt;/P&gt;

&lt;P&gt;That data limitation is only when post-process is search on non-transforming base search.&lt;/P&gt;

&lt;P&gt;In my case, I have used stats command in base search which transforms the data and so there should be no data limitation in post-process search.&lt;BR /&gt;
Also my csv contains only 2 records and only one distinct artist name so data must not be the issue.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2015 06:23:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149009#M9042</guid>
      <dc:creator>ishangajera</dc:creator>
      <dc:date>2015-08-04T06:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to populate dropdown dynamically using PostProcess Search. Error: "Could not create search"</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149010#M9043</link>
      <description>&lt;P&gt;Hey Thanks! That solved my issue.&lt;/P&gt;

&lt;P&gt;By adding submitButton="true" in fieldset, got the post process to work.&lt;/P&gt;

&lt;P&gt;If you find the reason why that is required, please let me know.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2015 06:25:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149010#M9043</guid>
      <dc:creator>ishangajera</dc:creator>
      <dc:date>2015-08-04T06:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to populate dropdown dynamically using PostProcess Search. Error: "Could not create search"</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149011#M9044</link>
      <description>&lt;P&gt;Hi Ishangajera,&lt;/P&gt;

&lt;P&gt;In regards to 10k data limitation for post-search, my understanding (from reading the documentation) is that transforming commands do not remove this limitation; it's simply a way to reduce the amount of _raw data to hopefully less than 10k. I've not actually tested this, so I could be wrong. Maybe I'll give it a go if I get some time.    &lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2015 21:15:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Unable-to-populate-dropdown-dynamically-using-PostProcess-Search/m-p/149011#M9044</guid>
      <dc:creator>gcato</dc:creator>
      <dc:date>2015-08-04T21:15:20Z</dc:date>
    </item>
  </channel>
</rss>

