Dashboards & Visualizations

Is it possible to have drop-down choice value as a link to another dashboard?

puneetkharband1
Path Finder

I have one drop-down on dashboard 1 and dashboard 2 collects the value and runs a search on that.

Is there a way to use a link in the drop-down on dashboard 1?

MainPage_Drilldown

<input type="dropdown" searchWhenChanged="true" token="App">
  <label>Application</label>
  <choice value=>abc</choice>
  <choice value="abc1">abc1</choice>
  <choice value="abc3">abc2</choice>
  <choice value="TCI">abc</choice>
     </input>
 </fieldset>

I want the Value here to be a link to dashboard which Is a token in search on the same dashboard.

niketn
Legend

Links can be attached to Dropdown change event for opening another page within Splunk or Web URL.
Following is an example I have taken from Splunk Documentation (only added CDATA for Splunk internal link)

  <fieldset submitButton="false">
      <input type="dropdown" token="openNewPageToken">
        <label></label>
        <default>Select a page to open</default>
        <choice value="">Select a page to open</choice>
        <choice value="manager_page">View prebuilt panels</choice>
        <choice value="splk_page">Open Splunk home page</choice>
        <change>
          <condition value="manager_page">
            <link target="_blank">
               <![CDATA[/manager/search/data/ui/panels?ns=-&pwnr=-&search=&count=25]]>
            </link>
          </condition>
          <condition value="splk_page">
            <link target="_blank">
              http://splunk.com
            </link>
          </condition>
        </change>
      </input>
    </fieldset>

Refer to Splunk Documentation for details... I have asked for CDATA correction in the Documentation
https://docs.splunk.com/Documentation/Splunk/latest/Viz/EventHandlerReference

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

baigura
Explorer

thank you for the answer

0 Karma

manish_singh_77
Builder

Hi Niket,

This is not working for me, I also tried the same approach.

0 Karma

manish_singh_77
Builder

@niketnilay : This is not working for me, I also tried the same approach

0 Karma

niketn
Legend

@manish_singh_777 can you share the code you have used for the <link> section? Is it Splunk Internal or External link? Also which version of Splunk are you on!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

manish_singh_77
Builder

@niketnilay ,
my bad, I was not using the within the , it is working for me.
I appreciate your prompt reply. Thanks again for your help!

niketn
Legend

@manish_singh_777, anytime! Do upvote the answer if it helped 🙂

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

niketn
Legend

@puneetkharbanda, was your problem solved. Please accept if this answer helped you resolve the issue if not please let us know if further help is needed.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

jeffland
SplunkTrust
SplunkTrust

In the originating dashboard, have a change with some condition if you like and do a link to the target dashboard:

<form>
  <label>Originating Dashboard</label>
  <fieldset submitButton="false">
    <input type="dropdown" searchWhenChanged="true" token="App">
      <label>Application</label>
      <choice value="abc">abc</choice>
      <choice value="abc1">abc1</choice>
      <choice value="abc3">abc2</choice>
      <choice value="TCI">abc3</choice>
      <change>
        <condition value="TCI">
          <!-- adjust app (search) and dashboard name (target) -->
          <link target="_blank">/app/search/target?form.app=$value$</link>
        </condition>
      </change>
    </input>
  </fieldset>
</form>

In the target dashboard, have a hidden input and use the token in a search normally:

<form>
  <label>target</label>
  <fieldset submitButton="false">
    <input type="text" depends="$hidden$" token="app">
      <label>field1</label>
    </input>
  </fieldset>
  <row>
    <panel>
      <event>
        <search>
          <query>| makeresults | eval foo="$app$"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
      </event>
    </panel>
  </row>
</form>

Find the relevant docs here.

0 Karma

baigura
Explorer

Did you find a solution ?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...