<?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: Submit button not working in drop down in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488717#M32014</link>
    <description>&lt;P&gt;Hi Kishan,&lt;/P&gt;

&lt;P&gt;Once you correct the change handler,you should use $ to fetch the token values.&lt;/P&gt;

&lt;P&gt;strptime($startdate$,"%m/%d/%Y %H:%M %p")&lt;BR /&gt;
strptime($enddate$,"%m/%d/%Y %H:%M %p")&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2019 16:08:34 GMT</pubDate>
    <dc:creator>dindu</dc:creator>
    <dc:date>2019-11-26T16:08:34Z</dc:date>
    <item>
      <title>Submit button not working in drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488712#M32009</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a dashboard that consists of two text boxes, a drop-down menu, and a submit button. &lt;BR /&gt;
The text boxes take in start time and end time. The drop-down menu holds multiple panels. &lt;/P&gt;

&lt;P&gt;What we want is for the user to be able to enter a start time, end time, pick the option they want to&lt;BR /&gt;
see in the drop-down menu, and then click the submit button. &lt;/P&gt;

&lt;P&gt;What is happening now is the submit button is being ignored. &lt;BR /&gt;
I have tried to change both the start date and end date text boxes to search &lt;CODE&gt;WhenChanged="true"&lt;/CODE&gt; and search &lt;CODE&gt;WhenChanged="false"&lt;/CODE&gt; but neither seems to work.  &lt;/P&gt;

&lt;P&gt;Is it possible for the submit button to be able to handle so many things? &lt;BR /&gt;
If so please provide a way for the submit button to work. &lt;BR /&gt;
If clarification is needed please ask and I will provide.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 20:48:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488712#M32009</guid>
      <dc:creator>kishan2356</dc:creator>
      <dc:date>2019-11-21T20:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Submit button not working in drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488713#M32010</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;If possible can you please post your code.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 07:02:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488713#M32010</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-11-22T07:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Submit button not working in drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488714#M32011</link>
      <description>&lt;P&gt;Hi kishan2356,&lt;/P&gt;

&lt;P&gt;Is your search dependent on the tokens that you are applying?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 07:49:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488714#M32011</guid>
      <dc:creator>nikita_p</dc:creator>
      <dc:date>2019-11-22T07:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Submit button not working in drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488715#M32012</link>
      <description>&lt;P&gt;Ive added the code for the text boxes, drop down box and submit button below. &lt;/P&gt;

&lt;P&gt;XX&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="text" token="startdate" searchWhenChanged="false"&amp;gt;
  &amp;lt;label&amp;gt;Start Date (mm/dd/yyyy hh:mm)&amp;lt;/label&amp;gt;
  &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
  &amp;lt;change&amp;gt;
    &amp;lt;condition&amp;gt;
      &amp;lt;eval token="new_earliest"&amp;gt;strptime(startdate,"%m/%d/%Y %H:%M %p")&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="new_earliest1"&amp;gt;strptime(startdate,"%m/%d/%Y %H:%M %p")-604800&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="new_earliest2"&amp;gt;strptime(startdate,"%m/%d/%Y %H:%M %p")-1209600&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="new_earliest3"&amp;gt;strptime(startdate,"%m/%d/%Y %H:%M %p")-1814400&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="new_earliest4"&amp;gt;strptime(startdate,"%m/%d/%Y %H:%M %p")-2419200&amp;lt;/eval&amp;gt;
    &amp;lt;/condition&amp;gt;
  &amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;input type="text" token="enddate" searchWhenChanged="false"&amp;gt; 
  &amp;lt;label&amp;gt;End Date (mm/dd/yyyy hh:mm)&amp;lt;/label&amp;gt;
  &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
  &amp;lt;change&amp;gt;
    &amp;lt;condition&amp;gt;
      &amp;lt;eval token="new_latest"&amp;gt;strptime(enddate,"%m/%d/%Y %H:%M %p")&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="new_latest1"&amp;gt;strptime(enddate,"%m/%d/%Y %H:%M %p")-604800&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="new_latest2"&amp;gt;strptime(enddate,"%m/%d/%Y %H:%M %p")-1209600&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="new_latest3"&amp;gt;strptime(enddate,"%m/%d/%Y %H:%M %p")-1814400&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="new_latest4"&amp;gt;strptime(enddate,"%m/%d/%Y %H:%M %p")-2419200&amp;lt;/eval&amp;gt;
    &amp;lt;/condition&amp;gt;
  &amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;

&amp;lt;input type="dropdown" token="field1"&amp;gt;
  &amp;lt;label&amp;gt;X&amp;lt;/label&amp;gt;
  &amp;lt;choice value="A"&amp;gt;A&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="B"&amp;gt;B&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="C"&amp;gt;C&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="D"&amp;gt;D&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="E"&amp;gt;E&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="F"&amp;gt;F&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="G"&amp;gt;G&amp;lt;/choice&amp;gt;
  &amp;lt;choice value=”H"&amp;gt;H&amp;lt;/choice&amp;gt;
  &amp;lt;default&amp;gt;A&amp;lt;/default&amp;gt;
  &amp;lt;change&amp;gt;
    &amp;lt;condition value="A"&amp;gt;
      ……………………………………………………………………………………………………………………………………..
    &amp;lt;/condition&amp;gt;
  &amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Nov 2019 15:55:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488715#M32012</guid>
      <dc:creator>kishan2356</dc:creator>
      <dc:date>2019-11-22T15:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Submit button not working in drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488716#M32013</link>
      <description>&lt;P&gt;@kishan2356 this is an issue with &lt;CODE&gt;&amp;lt;change&amp;gt;&lt;/CODE&gt; event handler updating both Submit and Default token models. Hence subsequent searches depending on tokens declared in change event handler run even without submit button. Refer to one of my older answers to understand this behavior and use and independent search to add dummy dependency to prevent searches based on dummy dependent tokens from running until submit button is clicked: &lt;A href="https://answers.splunk.com/answers/742451/searchwhenchangedfalse-not-honored-1.html"&gt;https://answers.splunk.com/answers/742451/searchwhenchangedfalse-not-honored-1.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;On a different note refer to another one of my older answers to use jQuery Date picker in Splunk Dashboard which requires Simple XML JS extension: &lt;A href="https://answers.splunk.com/answers/627432/jquery-datepicker-in-splunk.html"&gt;https://answers.splunk.com/answers/627432/jquery-datepicker-in-splunk.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 05:50:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488716#M32013</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-11-26T05:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Submit button not working in drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488717#M32014</link>
      <description>&lt;P&gt;Hi Kishan,&lt;/P&gt;

&lt;P&gt;Once you correct the change handler,you should use $ to fetch the token values.&lt;/P&gt;

&lt;P&gt;strptime($startdate$,"%m/%d/%Y %H:%M %p")&lt;BR /&gt;
strptime($enddate$,"%m/%d/%Y %H:%M %p")&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 16:08:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488717#M32014</guid>
      <dc:creator>dindu</dc:creator>
      <dc:date>2019-11-26T16:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Submit button not working in drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488718#M32015</link>
      <description>&lt;P&gt;Hey @dindu can you provide this as a example using the XML code I provided? thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 16:34:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488718#M32015</guid>
      <dc:creator>kishan2356</dc:creator>
      <dc:date>2019-11-26T16:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Submit button not working in drop down</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488719#M32016</link>
      <description>&lt;P&gt;Hi @kishan2356,&lt;/P&gt;

&lt;P&gt;You could use the below snippet.&lt;BR /&gt;
I have included an option to display the values.You can remove it once you test the functionality.&lt;BR /&gt;
[Remove the tags at the end]&lt;BR /&gt;
Please upvote and accept if this helped!!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fieldset submitButton="true" &amp;gt;
 &amp;lt;input type="text" token="startdate" searchWhenChanged="false" &amp;gt;
&amp;lt;label&amp;gt;Start Date (mm/dd/yyyy hh:mm)&amp;lt;/label&amp;gt;
 &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
 &amp;lt;change&amp;gt;
  &amp;lt;condition&amp;gt;
   &amp;lt;eval token="new_earliest"&amp;gt;strptime($startdate$,"%m/%d/%Y %H:%M")&amp;lt;/eval&amp;gt;
   &amp;lt;eval token="new_earliest1"&amp;gt;strptime($startdate$,"%m/%d/%Y %H:%M")-604800&amp;lt;/eval&amp;gt;
   &amp;lt;eval token="new_earliest2"&amp;gt;strptime($startdate$,"%m/%d/%Y %H:%M")-1209600&amp;lt;/eval&amp;gt;
   &amp;lt;eval token="new_earliest3"&amp;gt;strptime($startdate$,"%m/%d/%Y %H:%M")-1814400&amp;lt;/eval&amp;gt;
   &amp;lt;eval token="new_earliest4"&amp;gt;strptime($startdate$,"%m/%d/%Y %H:%M")-2419200&amp;lt;/eval&amp;gt;
 &amp;lt;/condition&amp;gt;
&amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;input type="text" token="enddate" searchWhenChanged="false"&amp;gt; 
&amp;lt;label&amp;gt;End Date (mm/dd/yyyy hh:mm)&amp;lt;/label&amp;gt;
&amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
&amp;lt;change&amp;gt;
 &amp;lt;condition&amp;gt;
   &amp;lt;eval token="new_latest"&amp;gt;strptime($enddate$,"%m/%d/%Y %H:%M")&amp;lt;/eval&amp;gt;
   &amp;lt;eval token="new_latest1"&amp;gt;strptime($enddate$,"%m/%d/%Y %H:%M")-604800&amp;lt;/eval&amp;gt;
   &amp;lt;eval token="new_latest2"&amp;gt;strptime($enddate$,"%m/%d/%Y %H:%M")-1209600&amp;lt;/eval&amp;gt;
   &amp;lt;eval token="new_latest3"&amp;gt;strptime($enddate$,"%m/%d/%Y %H:%M")-1814400&amp;lt;/eval&amp;gt;
   &amp;lt;eval token="new_latest4"&amp;gt;strptime($enddate$,"%m/%d/%Y %H:%M")-2419200&amp;lt;/eval&amp;gt;
  &amp;lt;/condition&amp;gt;
  &amp;lt;/change&amp;gt;
 &amp;lt;/input&amp;gt;
 &amp;lt;input type="dropdown" token="field1" searchWhenChanged="false"&amp;gt;
&amp;lt;label&amp;gt;X&amp;lt;/label&amp;gt;
&amp;lt;choice value="A"&amp;gt;A&amp;lt;/choice&amp;gt;
&amp;lt;choice value="B"&amp;gt;B&amp;lt;/choice&amp;gt;
&amp;lt;choice value="C"&amp;gt;C&amp;lt;/choice&amp;gt;
&amp;lt;choice value="D"&amp;gt;D&amp;lt;/choice&amp;gt;
&amp;lt;choice value="E"&amp;gt;E&amp;lt;/choice&amp;gt;
&amp;lt;choice value="F"&amp;gt;F&amp;lt;/choice&amp;gt;
&amp;lt;choice value="G"&amp;gt;G&amp;lt;/choice&amp;gt;
&amp;lt;choice value="H"&amp;gt;H&amp;lt;/choice&amp;gt;
&amp;lt;default&amp;gt;A&amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;/fieldset&amp;gt;
&amp;lt;row&amp;gt;
 &amp;lt;html&amp;gt;
 &amp;lt;li&amp;gt; X $field1$&amp;lt;/li&amp;gt;
 &amp;lt;li&amp;gt;display startdate $startdate$&amp;lt;/li&amp;gt;
 &amp;lt;li&amp;gt;display new_earliest $new_earliest$&amp;lt;/li&amp;gt;
 &amp;lt;li&amp;gt;display new_earliest1 $new_earliest1$&amp;lt;/li&amp;gt;
 &amp;lt;li&amp;gt;display new_earliest2 $new_earliest2$&amp;lt;/li&amp;gt;
 &amp;lt;li&amp;gt;display new_earliest3 $new_earliest3$&amp;lt;/li&amp;gt;
 &amp;lt;li&amp;gt;display new_earliest4 $new_earliest4$&amp;lt;/li&amp;gt;
&amp;lt;/html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;li&amp;gt;display enddate $enddate$&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;display new_latest $new_latest$&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;display new_latest1 $new_latest1$&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;display new_latest2 $new_latest2$&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;display new_latest3 $new_latest3$&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;display new_latest4 $new_latest4$&amp;lt;/li&amp;gt;
 &amp;lt;/html&amp;gt;
&amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 18:10:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-not-working-in-drop-down/m-p/488719#M32016</guid>
      <dc:creator>dindu</dc:creator>
      <dc:date>2019-11-26T18:10:39Z</dc:date>
    </item>
  </channel>
</rss>

