Getting Data In

Passing a variable from search query to title in simple xml

Priya312
Explorer

Hi,
I have created a dashboard in simple xml. The alerts for every day is recorded in a lookup is shown in the dashboard. By default, the last alert will be shown in the panel.
In the title of the panel, i want to add the Date from the lookup like - "Alerts at 3-Sep-14".

Is it possible to pass the variable from the lookup to the panel title?

My code snippet:

 <row>
   <panel>
      <table> 
 <title>Daily Threshold - $Day$</title>
        <searchString>| inputlookup test.csv | search [|inputlookup test.csv | dedup Day | head 1 | table Day | return Day] | table Day,Operator,Alerts </searchString>

I want the Day value in the search query to be displayed as the title of the dashboard panel.

Tags (2)
0 Karma

gokadroid
Motivator

Why don't you use a "hidden" drop down to set a token which will reflect in title. The search in the dropdown should be exactly same as that in the panel.

0 Karma

billself
New Member

Hi Priya312

Did you ever solve this? I want to do something similar, though I have my titles in tags on my panels and want to display the latest value as part of the header to bar charts.

All the best
Bill

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...