Dashboards & Visualizations

How to Preset Search Results in Dashboard Text

nanachu
Path Finder

Hi all,

I want to preset Search Results in Dashboard Text.

If I want to change name, can change name.

search string

|rest /services/authentication/current-context 

text source

<input type="text" token="name">
<label>username</label>
<default>$result.username$</default>
</input>

If I want to preset search results in text, What should I do?

Thank you for hepling me.

0 Karma
1 Solution

vnravikumar
Champion

Hi

Check this

<form>
  <label>temp</label>
  <search>
    <query>
      |rest /services/authentication/current-context
    </query>
    <done>
      <set token="form.username">$result.username$</set>
    </done>
  </search>
  <fieldset submitButton="false">
    <input type="text" token="username">
      <label>username</label>
    </input>
  </fieldset>
</form>

View solution in original post

0 Karma

vnravikumar
Champion

Hi

Check this

<form>
  <label>temp</label>
  <search>
    <query>
      |rest /services/authentication/current-context
    </query>
    <done>
      <set token="form.username">$result.username$</set>
    </done>
  </search>
  <fieldset submitButton="false">
    <input type="text" token="username">
      <label>username</label>
    </input>
  </fieldset>
</form>
0 Karma

nanachu
Path Finder

Thank you for helping me.
I did <fieldset submitButton="true">
So, it does not work well. it is my mistake.
Thank you so much.

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...