<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Pass the label of an input to the title of a panel? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357500#M23275</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have multiselect input and here's the code"&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;
      &amp;lt;label&amp;gt;Type&amp;lt;/label&amp;gt;&lt;BR /&gt;
      &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;&lt;BR /&gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;&lt;BR /&gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;&lt;BR /&gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;&lt;BR /&gt;
      &amp;lt;fieldForLabel&amp;gt;Ticket Type&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;
      &amp;lt;fieldForValue&amp;gt;Ticket Type&amp;lt;/fieldForValue&amp;gt;&lt;BR /&gt;
      &amp;lt;search base="baseSearch"&amp;gt;&lt;BR /&gt;
        &amp;lt;query&amp;gt;| stats count by "Ticket Type"&amp;lt;/query&amp;gt;&lt;BR /&gt;
      &amp;lt;/search&amp;gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;It generates to values, "Incidents" and "Service Request". &lt;BR /&gt;And using the token, I was able to pass the value to the title of a panel.&lt;BR /&gt;Now, what I'm trying to do is to pass the static label, which is the "All" to the title of the panel as well.&lt;/P&gt;
&lt;P&gt;How will I able to do that?&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jan 2023 16:24:11 GMT</pubDate>
    <dc:creator>jvmerilla</dc:creator>
    <dc:date>2023-01-12T16:24:11Z</dc:date>
    <item>
      <title>Pass the label of an input to the title of a panel?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357500#M23275</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have multiselect input and here's the code"&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;
      &amp;lt;label&amp;gt;Type&amp;lt;/label&amp;gt;&lt;BR /&gt;
      &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;&lt;BR /&gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;&lt;BR /&gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;&lt;BR /&gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;&lt;BR /&gt;
      &amp;lt;fieldForLabel&amp;gt;Ticket Type&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;
      &amp;lt;fieldForValue&amp;gt;Ticket Type&amp;lt;/fieldForValue&amp;gt;&lt;BR /&gt;
      &amp;lt;search base="baseSearch"&amp;gt;&lt;BR /&gt;
        &amp;lt;query&amp;gt;| stats count by "Ticket Type"&amp;lt;/query&amp;gt;&lt;BR /&gt;
      &amp;lt;/search&amp;gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;It generates to values, "Incidents" and "Service Request". &lt;BR /&gt;And using the token, I was able to pass the value to the title of a panel.&lt;BR /&gt;Now, what I'm trying to do is to pass the static label, which is the "All" to the title of the panel as well.&lt;/P&gt;
&lt;P&gt;How will I able to do that?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 16:24:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357500#M23275</guid>
      <dc:creator>jvmerilla</dc:creator>
      <dc:date>2023-01-12T16:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Pass the label of an input to the title of a panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357501#M23276</link>
      <description>&lt;P&gt;@jvmerilla, Dropdown input has default tokens &lt;CODE&gt;$value$&lt;/CODE&gt; and &lt;CODE&gt;$label$&lt;/CODE&gt; available within the &lt;CODE&gt;dropdown's change event handler&lt;/CODE&gt;. You need to add the following code to pass on the dropdown label as token.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;change&amp;gt;
        &amp;lt;set token="tokLabel"&amp;gt;$label$&amp;lt;/set&amp;gt;
      &amp;lt;/change&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is a run anywhere dashboard example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Label for Title&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="tokType" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Type&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Incidents"&amp;gt;Incidents&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Service Request"&amp;gt;Service Request&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;set token="tokLabel"&amp;gt;$label$&amp;lt;/set&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Dropdown Label is $tokLabel$&amp;lt;/title&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| eval value="Token value is: $tokType$"
| fields - _time&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: You should check out &lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;Splunk Dashboard Examples&lt;/A&gt; App for &lt;CODE&gt;Input Multi-token Setter&lt;/CODE&gt; example.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 03:30:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357501#M23276</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-27T03:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pass the label of an input to the title of a panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357502#M23277</link>
      <description>&lt;P&gt;The only problem with using $label$ token with multi-select is that it only displays the first element, Is there a way to display all labels separated by a comma without using any javascript?&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 15:44:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357502#M23277</guid>
      <dc:creator>ss026381</dc:creator>
      <dc:date>2018-05-04T15:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Pass the label of an input to the title of a panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357503#M23278</link>
      <description>&lt;P&gt;To store all selected labels of a multiselect input as a comma-separated list, not just the first one, you could for example use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;change&amp;gt;
&amp;lt;set token="tokLabel" delimiter=","&amp;gt;$label$&amp;lt;/set&amp;gt;
&amp;lt;/change&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;prefix=""&lt;/CODE&gt; and &lt;CODE&gt;suffix=""&lt;/CODE&gt; are also valid attributes in &lt;CODE&gt;&amp;lt;set&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 14:50:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357503#M23278</guid>
      <dc:creator>BorisGrochalski</dc:creator>
      <dc:date>2018-07-11T14:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Pass the label of an input to the title of a panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357504#M23279</link>
      <description>&lt;P&gt;i also have the same issue, with mulitselect how to show all the fields label seelcted&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 10:53:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/357504#M23279</guid>
      <dc:creator>vikashperiwal</dc:creator>
      <dc:date>2020-02-28T10:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pass the label of an input to the title of a panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/626892#M51389</link>
      <description>&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 06:54:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-the-label-of-an-input-to-the-title-of-a-panel/m-p/626892#M51389</guid>
      <dc:creator>sugreev916</dc:creator>
      <dc:date>2023-01-12T06:54:33Z</dc:date>
    </item>
  </channel>
</rss>

