Splunk Search

field value to a variable

smolcj
Builder

Hi,
I have tried assigning the field value to a variable using text box and dropdown box. Is it possible to directly assign a field value to a variable and display in a form using html. it means i don't want the output as a table but in a text format. when i am uploading a file i need the certain field values in text format.
suppose my field is xyz and for sourcefile ABC it have only one value(mostly it will be a single value for one sourcefile)
so, how can i display in the dashboard or in a view like "value for the field: $field_value$ "
is it possible?
help me please
thanks in advance

Tags (1)
1 Solution

tiberious726
Path Finder

The format you need is $results[i].fieldname$

View solution in original post

0 Karma

tiberious726
Path Finder

The format you need is $results[i].fieldname$

0 Karma

tiberious726
Path Finder

another way is the ResultsValueSetter Module, which takes a "fields" param

0 Karma

RicoSuave
Builder

You will most easily achieve this by using sideview utils available here: http://splunk-base.splunk.com/apps/36405/sideview-utils

Download the app and read through the built in tutorial and pay attention to the html module. Sideview's module introduces plenty new tokens that you can grab off of search results and pass onto other modules.

smolcj
Builder

hi, but in this app, i didn't find any clue to assign a variable with a field value according to the search. i am getting the values populated by the dropdown or pulldown boxes in a variable but not other field values.

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