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
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!