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!

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 ...