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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...