All Apps and Add-ons

how to pass the field value in SimpleResultsTable to another view using redirector

disha
Contributor

My Search is like:

----Some Search--- | table time, customerID, EventData
<module name="Paginator">
  <param name="entityName">events</param>
  <param name="maxPages">25</param>

  <module name="SimpleResultsTable">
    <param name="drilldown">row</param>

    <module name="Redirector">
      <param name="url">MyFlashtimeLine</param>
      <param name="arg.EventData">$click.value$</param>
    </module>

  </module>
</module>

But in URL it is passing the value of first field of the row that is "time".
How I can pass the value of EventData and CustomerID to next view.
Please help.

Thanks,
Disha

sideview
SplunkTrust
SplunkTrust

First make sure you've checked out these pages in Sideview Utils,

"Key Techniques > Linking from view to view > Linking intro"

"Key Techniques > Linking from view to view > Linking to other views from tables"

The Table example does use the legacy "$click.value$" value in the actual redirector config, but note when you click a row in the first table, the documentation tells you all sorts of interesting things about the $foo$ keys you can access from the SimpleResultsTable's selected row. Splunk's $click.value$ key is very limited in that it will always be the value of the first visible column. Sideview Utils on the other hand adds all kinds of useful keys.

Most notably, if you want to access any value in the given row, you can use the Sideview keys $click.fields.myFieldName$ and $click.fields.someOtherFieldName$ etc...

This

So in your case, if your target view was called "myCustomView", and it had form elements like TextField or Pulldown modules, whose "name" params were "EventData" and "CustomerID", and which you wished to prepopulate when the page loads from these table clicks, then your Redirector would look like:

<module name="Redirector">
  <param name="url">MyCustomView</param>
  <param name="arg.EventData">$click.fields.EventData$</param>
  <param name="arg.CustomerID">$click.fields.CustomerID$</param>
</module>

Note that if you've already switched to using the Sideview Table module instead of the core SimpleResultsTable module, the default click prefix for Table is "row" instead of "click. You can change it by setting the Table module's optional "name" param, but it just defaults to row. So for Table the above would have $row.fields.EventData$ and $row.fields.CustomerID$ etc..

0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...