Dashboards & Visualizations

How to update input text fields when tokens are changed?

lassel
Communicator

I have a dashboard with three inputs: traceid, banknr, userid

I made a search for traceid with a drilldown that sets banknr and userid.

What I see: Tokens gets updated in the HTML panel
What I expect: Tokens gets updated in both the HTML panel AND in the input text fields.

How can I update the text fields, when their tokens change?

I am on Splunk 6.2

<form>
  <fieldset submitButton="false">
    <input type="text" token="banknr" searchWhenChanged="true">
      <label>Banknr</label>
    </input>
    <input type="text" token="userid" searchWhenChanged="true">
      <label>Brugernr</label>
    </input>
  </fieldset>
  <row>
    <panel>
      <html>
        <h1>Output $banknr$ $userid$ $traceid$</h1>
      </html>
    </panel>
  </row>
  <row>
    <panel>
      <input type="text" token="traceid">
        <label>TraceId</label>
      </input>
      <table>
        <title>Find bruger for traceid</title>
        <search>
          <query>traceid=$traceid$ log_type=REST | fields banknr, userid | dedup banknr, userid | table banknr, userid</query>
        </search>
        <option name="wrap">undefined</option>
        <option name="rowNumbers">undefined</option>
        <option name="drilldown">row</option>
    <drilldown>
          <set token="banknr">$row.banknr$</set>
          <set token="userid">$row.userid$</set>
        </drilldown>
      </table>
    </panel>
  </row>
</form>
0 Karma
1 Solution

lassel
Communicator

Ah. You need to set the default value to the token.
E.g. <default>$banknr$</default>

<input type="text" token="banknr" searchWhenChanged="true">
  <label>Banknr (fem cifre!)</label>
  <default>$banknr$</default>
</input>
<input type="text" token="userid" searchWhenChanged="true">
  <label>Brugernr</label>
  <default>$userid$</default>
</input>

View solution in original post

lassel
Communicator

Ah. You need to set the default value to the token.
E.g. <default>$banknr$</default>

<input type="text" token="banknr" searchWhenChanged="true">
  <label>Banknr (fem cifre!)</label>
  <default>$banknr$</default>
</input>
<input type="text" token="userid" searchWhenChanged="true">
  <label>Brugernr</label>
  <default>$userid$</default>
</input>
Get Updates on the Splunk Community!

Monitoring Postgres with OpenTelemetry

Behind every business-critical application, you’ll find databases. These behind-the-scenes stores power ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...

Splunk Edge Processor | Popular Use Cases to Get Started with Edge Processor

Splunk Edge Processor offers more efficient, flexible data transformation – helping you reduce noise, control ...