<?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 How to click on table cell to go to a URL referenced in event field (not in row data)? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/393375#M114433</link>
    <description>&lt;P&gt;I can't seem to figure out how to configure my XML so that when I click on a table cell, I go to a URL referenced in the cell's event's &lt;CODE&gt;url_id&lt;/CODE&gt; field.  The &lt;CODE&gt;url_id&lt;/CODE&gt; field is in the same event as which I grab the table cell's value, but it is not actually in the table. Then, after setting the token as &lt;CODE&gt;url_token&lt;/CODE&gt;, I set a link in drilldown with &lt;CODE&gt;&amp;lt;link&amp;gt;https://specificurl.com/$url_token$&amp;lt;/link&amp;gt;&lt;/CODE&gt;.  However, when I test it out in my dashboard, clicking on a table cell brings me to &lt;CODE&gt;&lt;A href="https://specificurl.com/%24result.url_id%24" target="test_blank"&gt;https://specificurl.com/%24result.url_id%24&lt;/A&gt;&lt;/CODE&gt; instead. &lt;/P&gt;

&lt;P&gt;Any suggestions for what to do to fix this? Thank you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt; [search query here] &amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;@w0&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;finalized&amp;gt;
        &amp;lt;set token="url_token"&amp;gt;$result.url_id$&amp;lt;/set&amp;gt;
      &amp;lt;/finalized&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="count"&amp;gt;50&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="refresh.display"&amp;gt;progressbar&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;link&amp;gt;https://specificurl.com/$url_token$&amp;lt;/link&amp;gt;
    &amp;lt;/drilldown&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Jul 2019 19:11:39 GMT</pubDate>
    <dc:creator>c_yeo</dc:creator>
    <dc:date>2019-07-19T19:11:39Z</dc:date>
    <item>
      <title>How to click on table cell to go to a URL referenced in event field (not in row data)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/393375#M114433</link>
      <description>&lt;P&gt;I can't seem to figure out how to configure my XML so that when I click on a table cell, I go to a URL referenced in the cell's event's &lt;CODE&gt;url_id&lt;/CODE&gt; field.  The &lt;CODE&gt;url_id&lt;/CODE&gt; field is in the same event as which I grab the table cell's value, but it is not actually in the table. Then, after setting the token as &lt;CODE&gt;url_token&lt;/CODE&gt;, I set a link in drilldown with &lt;CODE&gt;&amp;lt;link&amp;gt;https://specificurl.com/$url_token$&amp;lt;/link&amp;gt;&lt;/CODE&gt;.  However, when I test it out in my dashboard, clicking on a table cell brings me to &lt;CODE&gt;&lt;A href="https://specificurl.com/%24result.url_id%24" target="test_blank"&gt;https://specificurl.com/%24result.url_id%24&lt;/A&gt;&lt;/CODE&gt; instead. &lt;/P&gt;

&lt;P&gt;Any suggestions for what to do to fix this? Thank you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt; [search query here] &amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;@w0&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;finalized&amp;gt;
        &amp;lt;set token="url_token"&amp;gt;$result.url_id$&amp;lt;/set&amp;gt;
      &amp;lt;/finalized&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="count"&amp;gt;50&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="refresh.display"&amp;gt;progressbar&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;link&amp;gt;https://specificurl.com/$url_token$&amp;lt;/link&amp;gt;
    &amp;lt;/drilldown&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jul 2019 19:11:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/393375#M114433</guid>
      <dc:creator>c_yeo</dc:creator>
      <dc:date>2019-07-19T19:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to click on table cell to go to a URL referenced in event field (not in row data)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/393376#M114434</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Check this, here &lt;CODE&gt;url&lt;/CODE&gt; will not display in the table but onclick of &lt;CODE&gt;Host&lt;/CODE&gt; it is used in the drilldown.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;drilldown_url&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults 
| eval url="http://www.google.com",Host="Google" 
| append 
    [| makeresults 
    | eval url="http://www.yahoo.com",Host="Yahoo"] 
| append 
    [| makeresults 
    | eval url="http://www.facebook.com",Host="Facebook"]|table url,_time,Host&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
       &amp;lt;fields&amp;gt;_time,Host&amp;lt;/fields&amp;gt;
        &amp;lt;drilldown&amp;gt;
         &amp;lt;eval token="url"&amp;gt;replace($row.url$, "http://", ""&amp;lt;/eval&amp;gt;
           &amp;lt;link target="_blank"&amp;gt;
             &amp;lt;![CDATA[ &lt;A href="http://$url$" target="test_blank"&gt;http://$url$&lt;/A&gt; ]]&amp;gt;
           &amp;lt;/link&amp;gt;
           &amp;lt;/drilldown&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 20 Jul 2019 03:26:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/393376#M114434</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-20T03:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to click on table cell to go to a URL referenced in event field (not in row data)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/393377#M114435</link>
      <description>&lt;P&gt;@c_yeo you are trying to merge two different features together i.e. &lt;CODE&gt;Search Event Handler&lt;/CODE&gt; and &lt;CODE&gt;Drilldown&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Using &lt;CODE&gt;$result.&amp;lt;yourFieldName&amp;gt;$&lt;/CODE&gt; in &lt;CODE&gt;&amp;lt;progress&amp;gt;&lt;/CODE&gt; or &lt;CODE&gt;&amp;lt;done&amp;gt;&lt;/CODE&gt; Search Event Handler you get only one or first value of your field. Which is not what you want. Moreover the &lt;CODE&gt;&amp;lt;finalized&amp;gt;&lt;/CODE&gt; search event handler was deprecated from Splunk 6.5 onward so it would not work with latest version anyways. This is the reason why you are getting &lt;CODE&gt;%24&lt;/CODE&gt; in your drilldown URL is because is it the URL encoded character for &lt;CODE&gt;$&lt;/CODE&gt; which implies your token from search event handler is not getting resolved.&lt;/P&gt;

&lt;P&gt;What you need to do is to use built-in drilldown token called &lt;CODE&gt;$row.&amp;lt;yourFieldName&amp;gt;$&lt;/CODE&gt; to access the field value from the row in the table which is clicked.&lt;/P&gt;

&lt;P&gt;Please try out following drilldown code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;drilldown&amp;gt;
       &amp;lt;link target="_blank"&amp;gt;https://specificurl.com/$row.url_id$&amp;lt;/link&amp;gt;
   &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is a run anywhere example for you to try and confirm:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Link to URL using token from table&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
   &amp;lt;panel&amp;gt;
     &amp;lt;table&amp;gt;
       &amp;lt;search&amp;gt;
         &amp;lt;query&amp;gt;| makeresults
         | eval urlid="splunk,splunkbase,splunk answers"
         | makemv urlid delim=","
         | mvexpand urlid&amp;lt;/query&amp;gt;
         &amp;lt;earliest&amp;gt;@w0&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;50&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="refresh.display"&amp;gt;progressbar&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;link target="_blank"&amp;gt;https://www.google.com/search?&amp;amp;amp;q=$row.urlid$&amp;lt;/link&amp;gt;
       &amp;lt;/drilldown&amp;gt;
     &amp;lt;/table&amp;gt;
   &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: Also check out &lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;Splunk Dashboard Examples&lt;/A&gt; app to check out several drilldown examples including link to URL.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jul 2019 14:56:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/393377#M114435</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-07-20T14:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to click on table cell to go to a URL referenced in event field (not in row data)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/393378#M114436</link>
      <description>&lt;P&gt;@niketnilay thank you -- I've tried out your suggestion using &lt;CODE&gt;$row.urlid$&lt;/CODE&gt; in the drilldown. However, now when I click on the cell, I am bounced to the link &lt;CODE&gt;&lt;A href="https://specificurl.com/$row.urlid$" target="test_blank"&gt;https://specificurl.com/$row.urlid$&lt;/A&gt;&lt;/CODE&gt;. I think it's important for me to note that I do not reference the field &lt;CODE&gt;urlid&lt;/CODE&gt; in my search query at all, I am handling other fields. Do you have any further suggestions for the tokenization to succeed?&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jul 2019 22:59:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/393378#M114436</guid>
      <dc:creator>c_yeo</dc:creator>
      <dc:date>2019-07-21T22:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to click on table cell to go to a URL referenced in event field (not in row data)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/636516#M221053</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm after the solution to apply url to diffrent columns or column value, possible?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 12:30:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-click-on-table-cell-to-go-to-a-URL-referenced-in-event/m-p/636516#M221053</guid>
      <dc:creator>Bart</dc:creator>
      <dc:date>2023-03-29T12:30:43Z</dc:date>
    </item>
  </channel>
</rss>

