Getting Data In

How to pre-populate text boxes by passing tokens using simple xml in Splunk 6?

_gkollias
Builder

Hi All,

I have a dashboard that allows users to drilldown to a page where they can actually re-submit receipts to the customer. Since the recipient emails are being logged, I want to auto populate the To and CC fields in the email page rather than having them manually add them (there can be a lot of emails :))

How can I pre-populate text boxes in Splunk 6 using simple xml?

Any insight would be much appreciated.

Thanks!

1 Solution

_gkollias
Builder

Solved - I used the default tag with the fields as token for the value. The only caveat I discovered was that I actually need to table those values in the first page before I can pass it to the drill-down page.



$emailTo$

View solution in original post

_gkollias
Builder

Solved - I used the default tag with the fields as token for the value. The only caveat I discovered was that I actually need to table those values in the first page before I can pass it to the drill-down page.



$emailTo$

somesoni2
Revered Legend

Try something like this (run anywhere sample with two text boxes)

Main page(page1.xml)

<dashboard>
  <label>Page1</label>
  <row>    
      <table>
        <title>Sourcetype Distribution</title>
        <searchString>index=_internal earliest=-1h@h | stats count by sourcetype component</searchString>
        <earliestTime/>
        <latestTime/>
        <drilldown>
  <link>
  /app/search/page2?form.sourcetype=$row.sourcetype$&amp;form.component=$row.component$
  </link>
</drilldown>
      </table>  
  </row>
</dashboard>

drilldown page (page2.xml)

<form>
  <label>Page2</label>
  <fieldset>
  <input type="text" token="sourcetype">
    <label>sourcetype</label>
    <default></default>   
  </input>
     <input type="text" token="component">
    <label>component</label>
    <default></default>   
  </input>
</fieldset>
  <row>   
      <event>
        <title>Events by Sourcetype and component</title>
        <searchString>index=_internal sourcetype=$sourcetype$ component="$component$" earliest=-1h@h</searchString>
        <earliestTime/>
        <latestTime/>
      </event>   
  </row>
</form>

actionabledata
Path Finder

I know it was many years ago, but your answer helped, so thank you for your response 

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...