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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...