<?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 Re: How to add label with search query on dashboard using HTML in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-label-with-search-query-on-dashboard-using-HTML/m-p/553202#M38377</link>
    <description>&lt;P&gt;I only see the label, but not my query&lt;/P&gt;</description>
    <pubDate>Wed, 26 May 2021 23:08:42 GMT</pubDate>
    <dc:creator>MeMilo09</dc:creator>
    <dc:date>2021-05-26T23:08:42Z</dc:date>
    <item>
      <title>How to add label with search query on dashboard using HTML</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-label-with-search-query-on-dashboard-using-HTML/m-p/553030#M38330</link>
      <description>&lt;P&gt;Hello There,&lt;/P&gt;&lt;P&gt;I would like to add a label to my dashboard using HTML. The label is based out of my search query using Splunk SPL. I am able to add the label but my query shows the raw source code on my dashboard. How can I get my search query to show the actual results of the query and not the source code. Below is my code. Any help is welcome:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;h1&amp;gt;Sports Report&amp;lt;/h1&amp;gt;

&amp;lt;search&amp;gt;

&amp;lt;query&amp;gt;

  | rest /servicesNS/-/-/data/lookup-table-files search="*_Sports_Report.csv"

| eval updated=strptime(updated,"%FT%T%:z")

| eval desired_time=strftime(updated, "%B %d, %Y")

| rename desired_time as "Last Updated" title as Team

| table "Last Updated", Team

  &amp;lt;/query&amp;gt;

&amp;lt;/search&amp;gt;

&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 25 May 2021 22:10:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-label-with-search-query-on-dashboard-using-HTML/m-p/553030#M38330</guid>
      <dc:creator>MeMilo09</dc:creator>
      <dc:date>2021-05-25T22:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to add label with search query on dashboard using HTML</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-label-with-search-query-on-dashboard-using-HTML/m-p/553049#M38337</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233122"&gt;@MeMilo09&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can not execute Simple XML Element I HTML panel Or code. But you can execute it outside of HTML and use in html.&lt;/P&gt;&lt;P&gt;Please check below sample code.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Value in HTML Panel&amp;lt;/label&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;| makeresults | eval DashboardLabel="My Dashboard Label"&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;done&amp;gt;
      &amp;lt;set token="tkn_DashboardLabel"&amp;gt;$result.DashboardLabel$&amp;lt;/set&amp;gt;
    &amp;lt;/done&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;body&amp;gt;
          &amp;lt;h1&amp;gt;$tkn_DashboardLabel$&amp;lt;/h1&amp;gt;
        &amp;lt;/body&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 26 May 2021 04:32:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-label-with-search-query-on-dashboard-using-HTML/m-p/553049#M38337</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-05-26T04:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to add label with search query on dashboard using HTML</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-label-with-search-query-on-dashboard-using-HTML/m-p/553202#M38377</link>
      <description>&lt;P&gt;I only see the label, but not my query&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 23:08:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-label-with-search-query-on-dashboard-using-HTML/m-p/553202#M38377</guid>
      <dc:creator>MeMilo09</dc:creator>
      <dc:date>2021-05-26T23:08:42Z</dc:date>
    </item>
  </channel>
</rss>

