Splunk Search

How to Fetch the output based on the input value from Dropdown

dhineshv1
Engager

Hi,

I have an log which show currency field and it will have all the valid currency codes like JPY, CNY, USD etc..

I need to add a dropdown on top with currency value, but my  query i should differentiate between local and foreign currency, for example user have to search by selecting 1st option as JPY and another option should list me all the other currency except JPY,

I am not sure if this possible in splunk, need experts advice here.

CurrencyAmountCard Brand
JPY100XXX
CNY100XYZ
INR100UUU
Labels (3)
0 Karma

dhineshv1
Engager

Hi, Thanks for responding, let me try to explain it clearly, Refer to the below table on how my data look like

CurrencyAmountCard Brand
JPY100XXX
CNY100XYZ
INR100UUU

 

1. I should have a dropdown name currency and list down 2 options, one will be Local (assume JPY is local here currency in this case), second option will be cross border

 

2. When i choose Local, then i need to show the result where the currency = JPY (this is straight forward one)

CurrencyAmountCard Brand
JPY100XXX

 

3. When i choose cross border, then i need to show the result where the currency ! = JPY (i.e all results except JPY as below)

CNY100XYZ
INR100UUU
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @dhineshv1 ,

OK, where is located the information if a currency is local or foreigner?

I suppose that's related to the user account.

So you could create a lookup containing the system users and the related currency.

Then an input with two options: local or foreigner.

in local you could use the following expression:

[ 
     | rest /services/authentication/current-context 
     | lookup your lookup.csv title OUTPUT Currency
     | table Currency
]

instead in foreigner, you could use the following expression:

NOT [ 
     | rest /services/authentication/current-context 
     | lookup your lookup.csv title OUTPUT Currency
     | table Currency
]

In this way you can filter your search in this way:

<your_main_search> $token$
| ...

Ciao.

Giuseppe

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @dhineshv1 ,

sorry but your request isn't so clear, let me summarize and correct me if there's somethinh wrong:

you need to add a dropdown containing all the currecies present in your data,

choosing a currency from the dropdown, you want to use this currency near your value or what else?

it's not clear "but my  query i should differentiate between local and foreign currency, for example user have to search by selecting 1st option as JPY and another option should list me all the other currency except JPY,", what do you mean? could you add a sampe of the output you whould?

Ciao.

Giuseppe

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...