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!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...