Dashboards & Visualizations

Dashboard Studio, Splunk Version: 9.1.3 - Setting default token values not working.

dcondliffe_splu
Splunk Employee
Splunk Employee

I am trying to set some token values when a dashboard loads or when the page is refreshed.

 

The documentation gives the following example:

"defaults": {
  "dataSources": {
    "ds.search": {
      "options": {
        "queryParameters": {
          "latest": "$global_time.latest$",
          "earliest": "$global_time.earliest$"
        }
      }
    }
  },
  "tokens": {
    "default": {
      "tokenName": {
        "value": "1986"
      }
    }
  }
},

This my code:
"defaults": {
		"dataSources": {
			"ds.search": {
				"options": {
					"queryParameters": {
						"latest": "$global_time.latest$",
						"earliest": "$global_time.earliest$"
					}
				}
			}
		},
		"tokens": {
			"default": {
				"Slot1_TailNum": {
					"value": "false"
				}
			}
		}
	},

Which is not working. 

I am using the "Interactions" Set tokens to set the value of the "Slot1_TailNum" token to something other than false to hide/show a table, which works fine. 

However when reloading the Dashboard or refreshing the page the table is still displayed, it does not seem to be setting the value to false when loading.

Any help would be greatly appreciated, I can run a zoom if required it you want/need to see.

 

Thanks

David

 

Labels (1)
0 Karma
1 Solution

marnall
Builder

When you refresh, can you see the token in the URL as form.Slot1_TailNum=true ? When you interact with the dashboard, it preserves the token values in the URL so they will keep their values when the page is simply refreshed. You can reload the page completely by removing all the token values after the question mark (?) in your dashboard URL.

View solution in original post

marnall
Builder

When you refresh, can you see the token in the URL as form.Slot1_TailNum=true ? When you interact with the dashboard, it preserves the token values in the URL so they will keep their values when the page is simply refreshed. You can reload the page completely by removing all the token values after the question mark (?) in your dashboard URL.

dcondliffe_splu
Splunk Employee
Splunk Employee

Thanks  VM.. got it working now ..

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...