I add the input dropdown to my dashboard which having Days of week from monday to sunday. But it needs to take the default value based on day of week of Today.
Suppose Today is Thursday, it will take Thursday as Default value. Tomorrow it should change to Friday as default value.
Is it possible to pass like that?
Create a base search in the dashboard to generate Date Day token
| eval TodayWeekDay=strftime(now(),"%A")
| table TodayWeekDay
In the dropdown input XML code select default as $DefaultWeekDay$
<input type="dropdown" .....
| makeresults count=1| eval DayOfWeek=strftime(now(),"%A") | fields DayOfWeek
Similar to somesoni2 but slightly different too. should run completely on the indexers and spare the search heads.
This should do it
<input type="dropdown" token="dayOfWeek">
<label>Day Of Week</label>
<query>| gentimes start=-7 | eval DayOfWeek=strftime(starttime,"%A") | table DayOfWeek</query>