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!

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...