Dashboards & Visualizations

How to create two date input fields to use as parameters for a query in an XML form?

gjohnson
New Member

I am trying to create an XML form in a dashboard that takes shows all tickets in a ticket system that fall between two dates. First problem is there doesn't seem to be a simple date picker, so I put a date time selector on the form. The second problem is that when I try to use the Between function of the Date Time custom selection it always fails with an error stating "Earliest time cannot be greater than latest time. "

So my question is, how do I create two date input fields (begindate and enddate) that I can use as parameters in a query such as

... | WHERE DateOpened > begindate AND DateOpened < enddate

I have tried using the and parameters under the , but they don't seem to function properly when I have a date picker... Any help would be appreciated.

Tags (4)
0 Karma

mw
Splunk Employee
Splunk Employee

You don't actually need two different time pickers to do this. One will allow you to select any slice of time imaginable. Basically, you would just edit the dashboard, add a time picker, then for each element in the dashboard ensure that the time used for the search will be the time chosen with the picker instead of the existing time selection for the search. Here's the doc link: http://docs.splunk.com/Documentation/Splunk/6.1.3/Viz/FormEditor#Add_a_time_input_to_a_form . Hope that helps.

Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...