Getting Data In

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

_gkollias
SplunkTrust
SplunkTrust

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

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

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

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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...