All Apps and Add-ons

Make one column in table module have hyperlinks but leave the rest non-link

ho000dor
Explorer

Hello,

The saved search creates a table with multiple rows. testrow7 is populated from a lookup and is just URLs to another site. I just want to make a hyperlink for those URLS and have it redirect to another tab or browser. Is that possible?

<module name="HiddenSavedSearch"  layoutPanel="panel_row1_col1" group="test1" autoRun="True">
        <param name="useHistory">True</param>
        <param name="savedSearch">testsearch</param>
        <module name="JobProgressIndicator" />
     <module name="Export">
            <param name="exportType">results</param>
               </module>
        <module name="Paginator">
            <param name="count">3</param>
            <param name="entityName">results</param>
              <module name="Table" layoutPanel="panel_row1_col1">
    <param name="count">100</param>
        </module>
        </module>
        </module>
0 Karma

sideview
SplunkTrust
SplunkTrust

Sure. In Sideview Utils terms you want to use "Table Embedding", and specifically you want to embed an HTML module into each of the given cells. Some Table Embedding scenarios can get mindbogglingly powerful, but the most common and simplest case of embedding an HTML module is super simple and easy.

I took the liberty of also changing the Paginator to a Pager, and removing the conflicting "count" params - you had count specified on both Paginator and Table and only one of those will win.

<module name="HiddenSavedSearch"  layoutPanel="panel_row1_col1" group="test1" autoRun="True">
  <param name="useHistory">True</param>
  <param name="savedSearch">testsearch</param>
  <module name="JobProgressIndicator" />
  <module name="Export">
    <param name="exportType">results</param>
  </module>
  <module name="Pager">
    <param name="count">3</param>
    <module name="Table">
      <module name="HTML" group="row.fields.url">
        <param name="html"><![CDATA[
          <a href="$row.fields.url$">$row.fields.url$</a>
        ]]></param>
      </module>  
    </module>
  </module>
</module>

Note in this XML I'm assuming that the name of your field is "url". Basically with Table Embedding, you're telling the Table, that when it gets to the given cell, instead of rendering the value as simple text in that cell, it should instantiate and run the given module(s). Then within those modules you can refer to any of the row's field values via $row.fields.fieldName$

So for instance if you have another field that you want to use in the label of the link, you can use $row.fields.someOtherField$ inside the `tag, as long as that field is present in the row. If you want the Table module to *have* a field so you can use it in embedded modules or drilldowns, but you dont want it to actually render a column for the field, you can usefield1, field2` Of course all this and more is explained in the Table module docs and the working examples, inside the app itself.

Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...