Hi,
I wonder whether someone could help me please.
I'm using a query which interrogates a Summary Index containing two fields called Epoch_STime and Epoch_ETime.
I'm then using the query in a dashboard panel which includes a timepicker called "timerange".
What I'm trying to do is set the earliest time from the timepicker to the Epoch_STime and the latest date of the timepicker to Epoch_ETime.
I've tried earliest=$Epoch_Stime$ and the same for the latest time , but I can't get this to work.
Could someone possibly look at this please and let me know where I've gone wrong?
Many thanks and kind regards
Chris
Hi,
If I understand your question correctly you need to set the time picker earliest and latest value based on field value right? Can you please have a look at the below code snippet and see whether its satisfying your requirement?
<form>
<label>demo</label>
<search id="base_search">
<query>
| makeresults
| eval Epoch_STime=strptime("02/26/2019","%m/%d/%Y"), Epoch_ETime=strptime("02/28/2019","%m/%d/%Y")
</query>
<done>
<set token="form.time.earliest">$result.Epoch_STime$</set>
<set token="form.time.latest">$result.Epoch_ETime$</set>
</done>
</search>
<fieldset submitButton="false">
<input type="time" token="time">
<label>Time</label>
<default>
<earliest>0</earliest>
<latest>now</latest>
</default>
</input>
</fieldset>
</form>