Dashboards & Visualizations

How to change color of checkbox on the basis of user is active or inactive?

Atchyuth_P
Path Finder

Hello - I have a requirement where there are 10 user and want to highlight if user is active or inactive. Based on the requirement I have gone with checkbox since there can be multiple users active at same time.

Condition - 
If the user is active then checkbox should be checked.
If the user is inactive then checkbox should be unchecked   

We are validating via SPL query if user is active or inactive.
Help me with JS Code where we can pass data into checkbox and toggle the checkbox value. i.e. 1 or 0
1 means active
0 means inactive

 

 

Labels (3)
Tags (3)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Do you mean show a column in a table with a checkbox type display that is just information and cannot be checked?

You can always do this type of logic without using an JS

| fieldformat Active=if(Active=1,"✅","❌")

where you are pasting the Unicode tick/cross characters into the UI

Those characters come from

https://unicode-table.com/en/sets/check/

 

0 Karma
Get Updates on the Splunk Community!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...