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
Where is CurDate set?
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
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.