Dashboards & Visualizations

Classic Dashboard HTML Link with Tokens

lcguilfoil
Path Finder

I have a Classic Dashboard where I have an HTML panel. I am trying to link to another dashboard with tokens that the user can select via multiselects. However, it isn't working. This is my HTML panel:

<row>
	<panel>
		<html><div>
		<a target="_blank" href=/app/app/operating_system?form.case_token=$case_token$&amp;form.host_name=$host_name$">Operating System Artifacts</a>
		</div></html>
	</panel>
</row>
Labels (4)
0 Karma

lcguilfoil
Path Finder

I made a typo in my post, so here is the actual version. Thank you in advance for your help!

<row>
	<panel>
		<html><div>
		<a target="_blank" href="/app/app/operating_system?form.case_token=$case_token$&amp;form.host_name=$host_name$">Operating System Artifacts</a>
		</div></html>
	</panel>
</row>
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Please provide more information - what do you mean by "not working"? What does the rest of your dashboard look like? What does your target dashboard look like?

I have not been able to reproduce the issue from the limited information you have provided, however, I have created a dashboard with tokens making up a link in an HTML panel which does work.

0 Karma

lcguilfoil
Path Finder

Here is the initial dashboard:

<form version="1.1" theme="dark">
  <label>Case Overview</label>
  <fieldset submitButton="false" autoRun="true">
    <input type="dropdown" token="case_token" searchWhenChanged="true">
      <label>Case Selector</label>
      <prefix>index=virtuoso_</prefix>
      <suffix>*</suffix>
      <fieldForLabel>case</fieldForLabel>
      <fieldForValue>case</fieldForValue>
      <search>
        <query>| tstats count where index=index_* by index 
| rex field=index "\_(?&lt;case&gt;.*?)\_" 
| dedup case 
| table case</query>
        <earliest>0</earliest>
        <latest></latest>
      </search>
    </input>
    <input type="time" token="global_time">
      <label>Global Time Range</label>
      <default>
        <earliest>0</earliest>
        <latest></latest>
      </default>
    </input>
    <input type="dropdown" token="host_token" searchWhenChanged="true">
      <label>Host</label>
      <fieldForLabel>host</fieldForLabel>
      <fieldForValue>host</fieldForValue>
      <search>
        <query>| tstats count where $case_token$ by host
| table host</query>
        <earliest>0</earliest>
        <latest></latest>
      </search>
    </input>
  </fieldset>
  <row>
    <panel>
      <html><div>
        <a target="_blank" href="/app/app/operating_system_artifacts?case_token=$case_token$&amp;host_name=$host_name$">&lt;h1&gt;Operating System Artifacts&lt;/h1&gt;</a>
      </div></html>
    </panel>
  </row>
</form>

Here is the connecting dashboard:

<dashboard version="1.1" theme="dark">
  <label>Operating System Artifacts</label>
  <row>
    <panel>
      <html encoded="1">&lt;h1&gt;Prefetch&lt;/h1&gt;</html>
    </panel>
  </row>
  <row>
    <panel>
      <table>
        <title>Prefetch Files</title>
        <search>
          <query>$case_token$ host=$host_token$
| table ApplicationPath, LastRun, TimesRan</query>
          <earliest>$global_time.earliest$</earliest>
          <latest>$global_time.latest$</latest>
        </search>
        <option name="count">10</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <format type="color" field="ApplicationPath">
          <colorPalette type="sharedList"></colorPalette>
          <scale type="sharedCategory"></scale>
        </format>
      </table>
    </panel>
  </row>
</dashboard>
0 Karma

lcguilfoil
Path Finder

It brings me to the next dashboard, but the tokens aren't set.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You can't set tokens like this, they should be tokens from an input. Try something like this

        <a target="_blank" href="/app/app/operating_system_artifacts?form.case_token=$case_token$&amp;form.host_name=$host_name$">&lt;h1&gt;Operating System Artifacts&lt;/h1&gt;</a>

And convert your target dashboard to a form and add a couple of hidden text inputs

  <row>
    <panel>
      <input type="text" token="case_token" depends="$alwaysHide$"></input>
      <input type="text" token="host_name" depends="$alwaysHide$"></input>
      <html encoded="1">&lt;h1&gt;Prefetch&lt;/h1&gt;</html>
    </panel>
  </row>
0 Karma

lcguilfoil
Path Finder

I did this, but it still doesn't work. When I click on the link, this is the URL that flashes:

/apps/apps/operating_system_artifacts?form.case_token=index=index_burns*&form.host_name=$host_name$

Then, immediately after, it changes to:

/apps/apps/operating_system_artifacts?form.case_token=index&form.host_name=%24host_name%24

Do you think the issue could be how the multi-select token works?

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You aren't using multi-selects, you are using dropdowns, these are different types of inputs. Anyway, that probably isn't your issue. Try encoding the tokens for use in an URL (with the |u modifier)

        <a target="_blank" href="/app/app/operating_system_artifacts?case_token=$case_token|u$&amp;host_name=$host_name|u$">&lt;h1&gt;Operating System Artifacts&lt;/h1&gt;</a>

 

0 Karma

lcguilfoil
Path Finder

Perfect, that worked for the URL and setting the tokens. However, the search on the second dashboard (operating system), still says "Search is waiting for input..."

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Your second dashboard doesn't have a global_time input - probably waiting for that to be set?

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

Data Management Digest – November 2025

  Welcome to the inaugural edition of Data Management Digest! As your trusted partner in data innovation, the ...