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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...