Dashboards & Visualizations

How to save the results of a search into a token?

Marco_Develops
Path Finder

I'm trying to save the results of my search in a token so I can reference it in another visualization.  I've read other post and people are using the <done> tags to solve this issue.

 

Below is my code

 

 

<row>
    <panel>
      <single>
        <search>
          <query>index = * | stats count as c</query>
          <earliest>$time.earliest$</earliest>
          <latest>$time.latest$</latest>
          <done> 
            <set token="results" >$row.c$</set>
          </done>
        </search>
        <option name="drilldown">none</option>
      </single>
    </panel>
  </row>

 

 

 

ideally I would like to reference the "Results" token in other searches. Any help is appreciated. 

-Marco 

Labels (4)
Tags (1)
0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Change 

<set token="results" >$row.c$</set>

with 

<set token="results" >$result.c$</set>

 

The $row.xxx works when you drilldown using a click.

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

Change 

<set token="results" >$row.c$</set>

with 

<set token="results" >$result.c$</set>

 

The $row.xxx works when you drilldown using a click.

richgalloway
SplunkTrust
SplunkTrust

How is that code failing you?  How are you trying to reference the $results$ token?

---
If this reply helps you, Karma would be appreciated.
0 Karma

Marco_Develops
Path Finder

 @somesoni2  Switching from row to results worked as needed.

Thank you,

Marco

 

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...