<?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 Using SimpleXML, how do you populate singlevalue underLabel option with value from search? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-SimpleXML-how-do-you-populate-singlevalue-underLabel/m-p/292250#M18539</link>
    <description>&lt;P&gt;Is it possible to output other values from a search that populates a singlevalue element in my dashboard? What I want is to include a custom description under the singlevalue. &lt;/P&gt;

&lt;P&gt;example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | EVAL singlevalue="5" | EVAL description="this is a description"  | TABLE singlevalue, description

 &amp;lt;option name="underLabel"&amp;gt;$search.description$&amp;lt;/option&amp;gt;

 Output:
 5
 this is a description
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 23 Mar 2017 13:05:02 GMT</pubDate>
    <dc:creator>jpass</dc:creator>
    <dc:date>2017-03-23T13:05:02Z</dc:date>
    <item>
      <title>Using SimpleXML, how do you populate singlevalue underLabel option with value from search?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-SimpleXML-how-do-you-populate-singlevalue-underLabel/m-p/292250#M18539</link>
      <description>&lt;P&gt;Is it possible to output other values from a search that populates a singlevalue element in my dashboard? What I want is to include a custom description under the singlevalue. &lt;/P&gt;

&lt;P&gt;example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | EVAL singlevalue="5" | EVAL description="this is a description"  | TABLE singlevalue, description

 &amp;lt;option name="underLabel"&amp;gt;$search.description$&amp;lt;/option&amp;gt;

 Output:
 5
 this is a description
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Mar 2017 13:05:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-SimpleXML-how-do-you-populate-singlevalue-underLabel/m-p/292250#M18539</guid>
      <dc:creator>jpass</dc:creator>
      <dc:date>2017-03-23T13:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using SimpleXML, how do you populate singlevalue underLabel option with value from search?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-SimpleXML-how-do-you-populate-singlevalue-underLabel/m-p/292251#M18540</link>
      <description>&lt;P&gt;Not exactly, but this should be good enough for you unless you are really picky:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Demonstration of a single value description&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;description on single value panel&amp;lt;/description&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;$description$&amp;lt;/title&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;$description$&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;|makeresults | eval singlevalue="5" | eval  description="this is a description"  | table singlevalue description&amp;lt;/query&amp;gt;
        &amp;lt;finalized&amp;gt;
          &amp;lt;set token="description"&amp;gt;$result.description$&amp;lt;/set&amp;gt;
        &amp;lt;/finalized&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Mar 2017 14:10:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-SimpleXML-how-do-you-populate-singlevalue-underLabel/m-p/292251#M18540</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-23T14:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using SimpleXML, how do you populate singlevalue underLabel option with value from search?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-SimpleXML-how-do-you-populate-singlevalue-underLabel/m-p/292252#M18541</link>
      <description>&lt;P&gt;I assume this is what you intended:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Result Token&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Set underLabel by result&amp;lt;/title&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults | eval label="MyLabel" | eval value="MyValue" | table value, label&amp;lt;/query&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;set token="testtoken"&amp;gt;$result.label$&amp;lt;/set&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;
        [...] other options [...]
        &amp;lt;option name="underLabel"&amp;gt;$testtoken$&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You have to set another token with the search results, as simpleXML seems to not be able to access the search results directly.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 16:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-SimpleXML-how-do-you-populate-singlevalue-underLabel/m-p/292252#M18541</guid>
      <dc:creator>DMohn</dc:creator>
      <dc:date>2017-03-23T16:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using SimpleXML, how do you populate singlevalue underLabel option with value from search?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-SimpleXML-how-do-you-populate-singlevalue-underLabel/m-p/292253#M18542</link>
      <description>&lt;P&gt;Easy enough. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 17:02:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-SimpleXML-how-do-you-populate-singlevalue-underLabel/m-p/292253#M18542</guid>
      <dc:creator>jpass</dc:creator>
      <dc:date>2017-03-23T17:02:43Z</dc:date>
    </item>
  </channel>
</rss>

