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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...