I have defined a number.input field in Dashboard Studio (Version:9.0.2) so that the user can select a number representing a date (between 1-31). I want the date to be set to current day's date by default when the user opens the dashboard..
But "defaultValue": "$token_curr_date$" in the code below throws error - Incorrect Type. Expected "number"
Not working still. I am thinking that its not even recognizing the token value. Anything wrong with the way I am defining the token or maybe I need to initialize it before it can be referenced?
The strftime function returns a string rather than an integer expected by defaultValue. Try converting the string into a number.
...
"options": {
"query": "| makeresults | eval token_curr_date=tonumber(strftime(now(), \"%d\")) | fields token_curr_date"
},
...