Dashboards & Visualizations

Filter tokens based on Row depends and Row Rejects

Muthu_Vinith
Path Finder

Hey Experts,

I am encountering an issue  with using filter tokens in specific row on my dashboard. I have two filters named ABC and DEF, tokens represented for ABC is $abc$ and DEF is $def$. 

I want to pass these tokens only to one specific row, while for others, I want to reject them. 

For the rows where i need to pass the tokens, I've used the following syntax: 

<row depends="$abc$ $def$"></row>

For the row where i don't want to use the token, I've used the following syntax; 

<row rejects="$abc$ $def$"></row>.



However when i use the rejects condition, the rows are hidden. I want these rows to still be visible.

Any help or example queries would be greatly appreciated. Thank You!

Labels (3)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Note that depends and rejects take a comma separated list of tokens, not a space separated list. 

0 Karma

Muthu_Vinith
Path Finder

Yeah the tokens are in comma separated, but the only thing is when i use rejects condition the rows  are hidden. How to fix that? @bowesmana 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

That's the way rejects works.  When the token has a value, the element is hidden.  To make the element always visible, remove the rejects option.

---
If this reply helps you, Karma would be appreciated.
0 Karma

Muthu_Vinith
Path Finder

Is there any ways to create a new token where i can pass it to filters (i.e ABC and DEF) and rows? @richgalloway @bowesmana

0 Karma

richgalloway
SplunkTrust
SplunkTrust

In Advanced XML, all tokens are global in scope so there is no need to "pass" them.

---
If this reply helps you, Karma would be appreciated.
0 Karma

Muthu_Vinith
Path Finder

So how can i use <change> condition in my case. Any example queries would be greatly appreciated @richgalloway . They told to create a new token and pass it to filter and row.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Who told you to create a new token?

What problem are you trying to solve?  I think I need a bigger picture so I understand what is happening and how to get it to work.

---
If this reply helps you, Karma would be appreciated.
0 Karma

Muthu_Vinith
Path Finder

@richgalloway .Please check your inbox

0 Karma

richgalloway
SplunkTrust
SplunkTrust

I'm having 5 filters in that, I've two filters called group and class for group token=$group$ and for class=$class$.
For group and class filters only one specific row that is SQL having values, others rows does not have values. if i pass token $class$ and $group$ in SQL. I'm getting results, but when i pass these tokens to other rows, it will be zero, because there is no values for class and group. 
But i want to show other rows also but $class$ and $group$ token should be rejected because other filter having values for these rows also. So only i'm asking we can use depends or rejects. Please I need your help to solve this.

The depends and rejects options control the layout of the dashboard; they have no effect on the content of the dashboard panels.

Can you share the code in which the tokens are being used?  That may help with my understanding of the problem and allow me to make a useful suggestion.

---
If this reply helps you, Karma would be appreciated.
0 Karma

Muthu_Vinith
Path Finder

I've used tokens in the base search itself. Except class and group filter. I need to enable these two tokens for SQL row and need to disable it for others. @richgalloway 

0 Karma

bowesmana
SplunkTrust
SplunkTrust

You are only providing keyholes into your problem domain - we need to understand the bigger picture as @richgalloway says to understand what your problem is.

Can you provide your existing XML and/or searches showing the fields you are querying - please ensure the data is sanitised, so it can be posted here.

 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The depends and rejects options control visibility of the element.  That is the only function of the options.  To use a token in an element, just invoke the token name within the element.  There is no need to "declare" the token as one might in a programming language.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Everything Community at .conf24!

You may have seen mention of the .conf Community Zone 'round these parts and found yourself wondering what ...

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...