<?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: Is it possible to pass a URL (Not static) from a search field to create a clickable link in a dashboard? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295807#M174694</link>
    <description>&lt;P&gt;Try using the token filter &lt;CODE&gt;|n&lt;/CODE&gt;. Also, change the use of &lt;CODE&gt;target="_blank"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So you would edit the drilldown action to be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     &amp;lt;drilldown target="_blank"&amp;gt;
       &amp;lt;link&amp;gt;$click.value2|n$&amp;lt;/link&amp;gt;
     &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 May 2017 15:18:45 GMT</pubDate>
    <dc:creator>rjthibod</dc:creator>
    <dc:date>2017-05-16T15:18:45Z</dc:date>
    <item>
      <title>Is it possible to pass a URL (Not static) from a search field to create a clickable link in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295804#M174691</link>
      <description>&lt;P&gt;I can hard-code a static URL, but when I pass a value, Splunk adds the host to the URL to direct the link internally.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 14:00:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295804#M174691</guid>
      <dc:creator>rromanelli</dc:creator>
      <dc:date>2017-05-16T14:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to pass a URL (Not static) from a search field to create a clickable link in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295805#M174692</link>
      <description>&lt;P&gt;Can you share your XML? I am not real clear on what exactly you are trying to do.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 14:31:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295805#M174692</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-05-16T14:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to pass a URL (Not static) from a search field to create a clickable link in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295806#M174693</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;table id="link"&amp;gt;
    &amp;lt;title&amp;gt;Executions&amp;lt;/title&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;index=vzwindex Primary.testStatus=$status$ Primary.className=$className$ | eval Name='Primary.methodName' | eval Duration=tostring('Primary.testExecutionDuration', "duration") | eval ReportId=tostring('Primary.reportId') | eval link='Primary.windTunnelReport'  | eval user='Primary.username' | rename Primary.model  as Devices, Primary.device  as "Devices IMEI", Primary.testExecutionStart  as "Start Time", Primary.testExecutionEnd  as "End Time",  Primary.testStatus as Status |  table Name "Start Time" "End Time" Devices  "Devices IMEI" Status link&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;$TimePicker.earliest$&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;$TimePicker.latest$&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="count"&amp;gt;5&amp;lt;/option&amp;gt;
    &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
    &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
    &amp;lt;option name="rowNumbers"&amp;gt;true&amp;lt;/option&amp;gt;
    &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
    &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
    &amp;lt;drilldown&amp;gt;
      &amp;lt;link target="_blank"&amp;gt;$click.value2$&amp;lt;/link&amp;gt;
    &amp;lt;/drilldown&amp;gt;
  &amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I click where there is a link to a unique report in our system. We store the URL in 'Primary.windTunnelReport'.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 14:41:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295806#M174693</guid>
      <dc:creator>rromanelli</dc:creator>
      <dc:date>2017-05-16T14:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to pass a URL (Not static) from a search field to create a clickable link in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295807#M174694</link>
      <description>&lt;P&gt;Try using the token filter &lt;CODE&gt;|n&lt;/CODE&gt;. Also, change the use of &lt;CODE&gt;target="_blank"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So you would edit the drilldown action to be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     &amp;lt;drilldown target="_blank"&amp;gt;
       &amp;lt;link&amp;gt;$click.value2|n$&amp;lt;/link&amp;gt;
     &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 May 2017 15:18:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295807#M174694</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-05-16T15:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to pass a URL (Not static) from a search field to create a clickable link in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295808#M174695</link>
      <description>&lt;P&gt;Thanks, but no. It still prepends &lt;STRONG&gt;&lt;EM&gt;:8000/en-US/app/search&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 18:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295808#M174695</guid>
      <dc:creator>rromanelli</dc:creator>
      <dc:date>2017-05-16T18:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to pass a URL (Not static) from a search field to create a clickable link in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295809#M174696</link>
      <description>&lt;P&gt;@rromanelli, which version of Splunk are you using? Whether the URL in link column complete like &lt;A href="https://answers.splunk.com/answers/&amp;lt;somenumber"&gt;https://answers.splunk.com/answers/&amp;amp;lt;somenumber&lt;/A&gt;&amp;gt; or partial like &amp;lt;somenumber&amp;gt;&lt;/P&gt;

&lt;P&gt;If the URL is complete the answer by @rjthibod should work (_blank should work, and you can also restrict click only to link column in the table using code below).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;drilldown&amp;gt;
    &amp;lt;condition field="link"&amp;gt;
      &amp;lt;link target="_blank"&amp;gt;$click.value2|n$&amp;lt;/link&amp;gt;
    &amp;lt;/condition&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In order to test hard-code complete static URL in your directly in you drilldown event handler for link and see whether the page opens or not. If it does not then there is something wrong with the URL. If it launches fine then check the value being populated in the table.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 20:32:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295809#M174696</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-05-16T20:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to pass a URL (Not static) from a search field to create a clickable link in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295810#M174697</link>
      <description>&lt;P&gt;Hi rromanelli,&lt;/P&gt;

&lt;P&gt;I also had the same issue and did it by using javascript.&lt;BR /&gt;
I'm not sure you are Ok with javascript or not, So can you please try below code?&lt;/P&gt;

&lt;P&gt;XML&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form script="myjs.js"&amp;gt;
  &amp;lt;label&amp;gt;test&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="table_link"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="_internal" | top 5 sourcetype | eval link="http://www.google.com"&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-1h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;condition field="*"&amp;gt;
          &amp;lt;/condition&amp;gt;
        &amp;lt;/drilldown&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Javascript : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; require([
    'underscore',
    'jquery',
    'splunkjs/mvc',
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/simplexml/ready!'
], function(_, $, mvc, TableView) {
    var utils = require("splunkjs/mvc/utils");
    var CustomRangeRenderer = TableView.BaseCellRenderer.extend({
        canRender: function(cell) {
            return _(['link']).contains(cell.field);
        },
        render: function($td, cell) {
            $td.html("&amp;lt;div style='cursor:pointer;'&amp;gt;"+cell.value+"&amp;lt;/div&amp;gt;").on("click", function (e){
                console.log(cell.value);
                utils.redirect(cell.value,"_blank");
            });
        }
    });
    //List of table IDs to add icon
    var tableIDs = ["table_link"];
    for (i=0;i&amp;lt;tableIDs.length;i++) {
        var sh = mvc.Components.get(tableIDs[i]);
        if(typeof(sh)!="undefined") {
            sh.getVisualization(function(tableView) {
                // Add custom cell renderer and force re-render
                tableView.table.addCellRenderer(new CustomRangeRenderer());
                tableView.table.render();
            });
        }
    }
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if it is useful.&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Kamlesh&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 05:26:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295810#M174697</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2017-05-17T05:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to pass a URL (Not static) from a search field to create a clickable link in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295811#M174698</link>
      <description>&lt;P&gt;Hi Niketlilay,&lt;/P&gt;

&lt;P&gt;This worked! Thank you so much!&lt;/P&gt;

&lt;P&gt;Rick&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 11:01:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-pass-a-URL-Not-static-from-a-search-field-to/m-p/295811#M174698</guid>
      <dc:creator>rromanelli</dc:creator>
      <dc:date>2017-05-17T11:01:42Z</dc:date>
    </item>
  </channel>
</rss>

