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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...