Dashboards & Visualizations

Data in a table does not initially display in a dashboard with tokens

nick405060
Motivator

Hey there,

I have a dashboard that contains two textboxes, a submit button, and a table. Everything is working as it needs to, however the table does not initially display unless you click in both textboxes and then click the submit button. I have autorun dashboard checked. How can I get the data in the table to initially display when you load the dashboard?

<form>
  <fieldset submitButton="true" autoRun="true">
    <input type="text" token="spl_id_box">
    </input>
    <input type="text" token="notes_box">
      <label></label>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>
| inputlookup "alerts.csv" | table spl_id sender message_subject recipient contact_count_before_today _time INC notes | eval notes=if(spl_id=="$spl_id_box$","$notes_box$",notes) | outputlookup "alerts.csv"
          </query>
        </search>
      </table>
    </panel>
  </row>
</form>
0 Karma
1 Solution

nick405060
Motivator

@pyro_wood answered this question in Slack - many thanks. I added this after the completion of the fieldset stanza and that did the trick:

<init>
   <set token="spl_id_box"></set>
   <set token="notes_box"></set>
 </init>

View solution in original post

0 Karma

nick405060
Motivator

@pyro_wood answered this question in Slack - many thanks. I added this after the completion of the fieldset stanza and that did the trick:

<init>
   <set token="spl_id_box"></set>
   <set token="notes_box"></set>
 </init>
0 Karma

niketn
Legend

@nick405060 as your issue is resolved, please go ahead and Accept your own answer to mark this question as answered!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...