Hello,
So I have a below dashboard panel which is populated with lookup.
Name Organization Count
Bob splunk 2
Matt google 15
smith facebook 9
What I'm looking for is.
1. If I click the Bob, it has to open a new search tab with the query "| inputlookup mydetails.csv | search Name=Bob "
2. If I click the Splunk, it has to open a new url with "www.splunk.com"
For all the values respectively.
How do I achieve this within one ?
<drilldown>
<condition field="Name">
<link target="_blank">| inputlookup myfile.csv</link>
</condition>
<condition field="Organization">
<link target="_blank">$row.URL|n$</link>
</condition>
<condition field="URL">
<link target="_blank">$click.value2|n$</link>
</condition>
</drilldown>
You can use conditions in drilldowns to determine which field/column has been clicked
<drilldown>
<condition field="Name">
<link target="_blank">your search link</link>
</condition>
<condition field="Organization">
<link target="_blank">your organisation link</link>
</condition>
</drilldown>
Thank you @ITWhisperer That Worked...... BUT !!!
But, it is having some defect... When I click the Splunk/google/facebook its going to "www.splunk.com" ONLY.
<link target="_blank">www.splunk.com</link>
I have a url as well in my lookup like, what I'm looking is if i click the splunk it has to go with respective url. same way with other organizations
Name Organization URL Count
Bob splunk www.splunk.com 2
Matt google www.google.com 15
smith facebook www.facebook.com 9
In drilldown, you have access to $click.value2$ which is the cell value. You then program <condition/> with exact value.
<drilldown>
<condition field="Name">
<link target="_blank">| inputlookup myfile.csv</link>
</condition>
<condition field="Organization">
<link target="_blank">www.Splunk.com</link>
</condition>
</drilldown>
If I select Google in the Name field, it's getting redirect to the www.splunk.com only
<drilldown>
<condition field="Name">
<link target="_blank">| inputlookup myfile.csv</link>
</condition>
<condition field="Organization">
<link target="_blank">$row.URL|n$</link>
</condition>
<condition field="URL">
<link target="_blank">$click.value2|n$</link>
</condition>
</drilldown>
If this is not working, please share your exact dashboard source as something might have been lost in converting the answer to your solution.
@Naa_Win In your drilldown code do
<condition field="Organization">
<link target="_blank">$row.URL$</link>
</condition>
Note that if you want to add any characters to the URL or url string that must be encoded, use
$row.URL|s$ or if you want to prevent any character encoding use $row.URL|n$
If you also want to do the same if the URL field is clicked, add a new condition with the field=URL
@ITWhisperer @bowesmana Thanks for the code, It didn't worked with my case.
Sorry if it's confusing... I have a dashboard table with below. If i click value in "Organization" or URL, it has to go specific url
example: when i click google it has to direct to the url " https://air222.com/recxGlfW9picLnjwj" in new tab.
or if that doesn't work at least if i click url it has to go that url in new tab
Name Organization URL
Bob splunk https://air222.com/6FBPUQ3Di0FC3T
Matt google https://air222.com/recxGlfW9picLnjwj
smith facebook https://air222.com/recRRoUIFOMxSmjRf
It's not confusing, it should work if configured correctly.
So having changed the <condition>, what does it do when you click google?
What is the config for your
<option name="drilldown">XXX</option>
for that table?
XXX should be row
One panel can only use one type of drilldown. There can be several ways to hack something out. The most effective is to build a custom Web application to redirect the browser to whichever end URL it outputs based on the variables you send it. Alternative, you may settle with a lesser workaround: drilldown to a custom search (or a dashboard, or even just change another panel on the same dashboard) to display the URL you intend to send the browser to; then ask your user to copy and paste.