Hi @verd4nd1 If you create two Refresh buttons which set a different token value each (eg $refresh$=a or $refresh$=b) and then set conditional visibility on them so that it shows the other refresh button when pressed then you can use the $refresh$ token anywhere in your search and it would refresh when the value changes. Ive included example screenshot and code below to try it out: {
"title": "Answers - Refresh button",
"description": "",
"inputs": {
"input_BemUGiQ4": {
"containerOptions": {
"visibility": {
"showConditions": [
"condition_0EKVKhZd",
"condition_MRt3Jeks"
]
}
},
"eventHandlers": [
{
"options": {
"tokens": [
{
"token": "refresh",
"value": "a"
}
]
},
"type": "drilldown.setToken"
}
],
"options": {
"appearance": "destructive",
"label": "Refresh"
},
"type": "input.button"
},
"input_UWjUpoqS": {
"containerOptions": {
"visibility": {
"showConditions": [
"condition_0b7mpx2r",
"condition_3PisSwvj"
]
}
},
"eventHandlers": [
{
"options": {
"tokens": [
{
"token": "refresh",
"value": "b"
}
]
},
"type": "drilldown.setToken"
}
],
"options": {
"appearance": "destructiveSecondary",
"label": "Refresh"
},
"type": "input.button"
},
"input_global_trp": {
"options": {
"defaultValue": "-24h@h,now",
"token": "global_time"
},
"title": "Global Time Range",
"type": "input.timerange"
}
},
"defaults": {
"dataSources": {
"ds.o11y": {
"options": {
"queryParameters": {
"earliest": "$global_time.earliest$",
"latest": "$global_time.latest$"
}
}
},
"ds.search": {
"options": {
"queryParameters": {
"earliest": "$global_time.earliest$",
"latest": "$global_time.latest$"
}
}
},
"ds.spl2": {
"options": {
"queryParameters": {
"earliest": "$global_time.earliest$",
"latest": "$global_time.latest$"
}
}
}
},
"tokens": {
"default": {
"refresh": {
"value": "a"
}
}
},
"visualizations": {
"global": {
"showProgressBar": true
}
}
},
"visualizations": {
"viz_0yDZeXi0": {
"dataSources": {
"primary": "ds_jiB3RuM9"
},
"eventHandlers": [
{
"options": {
"tokens": [
{
"token": "refreshed",
"value": "done"
}
]
},
"type": "drilldown.setToken"
}
],
"options": {},
"type": "splunk.table"
}
},
"dataSources": {
"ds_jiB3RuM9": {
"name": "Refresher",
"options": {
"enableSmartSources": true,
"query": "| makeresults \n| eval refreshTime=\"$refresh$\"\n| addinfo",
"queryParameters": {
"earliest": "$global_time.earliest$",
"latest": "$global_time.latest$"
}
},
"type": "ds.search"
}
},
"layout": {
"globalInputs": [
"input_global_trp",
"input_BemUGiQ4",
"input_UWjUpoqS"
],
"layoutDefinitions": {
"layout_1": {
"options": {
"display": "auto",
"height": 960,
"width": 1440
},
"structure": [
{
"item": "viz_0yDZeXi0",
"position": {
"h": 300,
"w": 1090,
"x": 0,
"y": 0
},
"type": "block"
}
],
"type": "absolute"
}
},
"options": {},
"tabs": {
"items": [
{
"label": "New tab",
"layoutId": "layout_1"
}
]
}
},
"expressions": {
"conditions": {
"condition_3PisSwvj": {
"name": "refresh2",
"value": "$refresh$ = \"a\""
},
"condition_MRt3Jeks": {
"name": "refresh1",
"value": "$refresh$ = \"b\""
}
}
}
} 🌟 Did this answer help you? If so, please consider: Adding karma to show it was useful Marking it as the solution if it resolved your issue Commenting if you need any clarification Your feedback encourages the volunteers in this community to continue contributing.
... View more