Dashboards & Visualizations

Tokens not working in the panels

aditsss
Motivator

Hi Everyone,

I have two dropdowns and they are not working in the panels

Can someone guide me on that:

Below is my current code:

Dropdown:

<input type="dropdown" token="req" searchWhenChanged="true">
<label>Request Type</label>
<choice value="*">All Request_Type</choice>
<search>
<query>index=abc sourcetype=xyz source="user.log" process-groups | rex "\)\s+(?&lt;Request_Type&gt;[^ ]+)"|stats count by Request_Type </query>
<earliest>-60d@d</earliest>
<latest>now</latest>
</search>
<fieldForLabel>Request_Type</fieldForLabel>
<fieldForValue>Request_Type</fieldForValue>
<prefix>Request_Type="</prefix>
<suffix>"</suffix>
<initialValue>*</initialValue>
<default>*</default>
</input>
<input type="dropdown" token="usr" searchWhenChanged="true">
<label>NiFi_Users</label>
<choice value="*">All Users</choice>
<search>
<query>index=abc sourcetype=xyz source="user.log" process-groups | rex "\&lt;(?&lt;Request_User&gt;\w+)\&gt;\&lt;"|stats count by Request_User</query>
<earliest>-60d@d</earliest>
<latest>now</latest>
</search>
<fieldForLabel>Request_User</fieldForLabel>
<fieldForValue>Request_User</fieldForValue>
<prefix>Request_User="</prefix>
<suffix>"</suffix>
<initialValue>*</initialValue>
<default>*</default>
</input>

Panel Code:

1st PANEL

<panel>
<chart>
<title>NiFi_Operations</title>
<search>
<query>index=abc sourcetype=uio source="user.log" process-groups |rex "\)\s+(?&lt;Request_Type&gt;[^ ]+)"|chart count(Request_Type) as "Request- Types" by Request_Type |search $req$ $usr$</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
</search>

2nd Panel

<panel>
<chart>
<title>NiFi_Users</title>
<search>
<query>index=abc sourcetype=xyz source="user.log" process-groups |rex "\&lt;(?&lt;Request_User&gt;\w+)\&gt;\&lt;"|chart count(Request_User) as "Users" by Request_User|search $usr$ $req$</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
</search>

I have extracted the field Request User and RequestType.

Can someone guide me why the t

 

Labels (3)
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...