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!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...