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.
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
thank you for the answer
Hi Niket,
This is not working for me, I also tried the same approach.
@niketnilay : This is not working for me, I also tried the same approach
@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!
@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!
@manish_singh_777, anytime! Do upvote the answer if it helped 🙂
@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.
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.
Did you find a solution ?