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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...