Dashboards & Visualizations

How to update input text fields when tokens are changed?

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

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

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

Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes
and swag!