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.
Currency | Amount | Card Brand |
JPY | 100 | XXX |
CNY | 100 | XYZ |
INR | 100 | UUU |
Hi, Thanks for responding, let me try to explain it clearly, Refer to the below table on how my data look like
Currency | Amount | Card Brand |
JPY | 100 | XXX |
CNY | 100 | XYZ |
INR | 100 | UUU |
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)
Currency | Amount | Card Brand |
JPY | 100 | XXX |
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)
CNY | 100 | XYZ |
INR | 100 | UUU |
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
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