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!

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...

Splunkbase | Splunk Dashboard Examples App for SimpleXML End of Life

The Splunk Dashboard Examples App for SimpleXML will reach end of support on Dec 19, 2024, after which no new ...

Understanding Generative AI Techniques and Their Application in Cybersecurity

Watch On-Demand Artificial intelligence is the talk of the town nowadays, with industries of all kinds ...