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!

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 ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...