Dashboards & Visualizations

Hide a field while still being able to reference its data?

smashedpumpkins
Explorer

I have a dashboard setup with several panels. In one panel I have a column which I use for calculations. This column is rather large and means nothing to the reader. I searched up and down for a solution to hide this column but it seems the only solution is to hide it is by using Javascript/CSS.

I read a few different answers which gave me some code to place in application.js but I couldn't get it to work. The column name is "logTemplate". I'm already loading a JS file for some in-page drilldown so I would prefer to add the code there. Any sugestions?

Tags (1)

iKate
Builder

First answer here shows how to do what you need, without CSS https://answers.splunk.com/answers/204419/do-this-in-simple-xml.html

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Two ideas:

You could just remove the column after doing your calculations:

... | your calculations based on field foo | fields - foo

Or, if for some reason you need the field afterwards as well - maybe for a drilldown -, you could instead use the fields option in the SimpleResultsTable module to hide it from view. See http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ModuleReference#SimpleResultsTable for reference.

martin_mueller
SplunkTrust
SplunkTrust

If you need the field for drilldowns then hiding it with the fields command isn't going to work for you, indeed.

For hiding columns without any JS customization, you can also use the Table module in SideviewUtils - see its hiddenFields parameter. Even when hidden you should still be able to refer to it with $row.fields.fieldname$ in your drilldown.

0 Karma

smashedpumpkins
Explorer

Forgive me as I'm probably going to ask a fairly simple question... First, I do need the field for drilldown purposes. I grabbed a sample from the site below, edited the column name, and swapped to SimpleResultsTable. I then created application.js, dropped the code in and restarted splunk web. The column did not hide. As I'm really not familiar with Splunk behind the scenes, I'm not getting very far troubleshooting.

http://answers.splunk.com/answers/96446/hide-custom-named-column-from-simpleresultstable

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!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...