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!

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

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...