Dashboards & Visualizations

Splunk Dashboard Studio - populate Current date as defaul value in input Text box

ravikumarsri
Observer

Hi Experts,

I am trying to convert a Splunk classic XML dashboard to  Splunk Dashboard Studio.

Below is my classic XML dashboard  code.

<fieldset autoRun="True" submitButton="false">
<input type="text" token="SelectedDay" searchWhenChanged="true">
<label>Enter Date (MM/DD/YYYY)</label>
<default>$CurDate$</default>
</input>
</fieldset>

The above code got converted to Splunk Dashboard Studio code as shown below. But when the Dashboard is displayed, token SelectedDay is set to "$CurDate$" instead of current date. 

Could you please help me on this ?   

"inputs": {
"input_9ejCAUHM": {
"type": "input.text",
"options": {
"token": "SelectedDay",
"selectFirstSearchResult": true,
"defaultValue": "$CurDate$"
},
"title": "Enter Date (MM/DD/YYYY)"
}
},

 

Thanks,

Ravikumar

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Where is CurDate set?

0 Karma

ravikumarsri
Observer

Hi,

I searched in the Dashboard code. "CurDate" is not set anywhere in the code.

Looks like "CurDate" is kind of build in variable in Classic XML Dashboard.

 

Thanks,

Ravikumar

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

OK - I have never come across that  in SimpleXML, indeed, it doesn't seem to work for me. Whatever the case, it seems like it isn't defined for you in Studio either.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...