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!

Enterprise Security Content Update (ESCU) | New Releases

In November, the Splunk Threat Research Team had one release of new security content via the Enterprise ...

Index This | Divide 100 by half. What do you get?

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

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

❄️ Celebrate the season with our December lineup of Community Office Hours, Tech Talks, and Webinars! ...