This is a fun question - thanks for asking it.
The custom column-rendering features in the Table module indeed are strictly static. (For readers who aren't familiar with this, within the Sideview Utils app you can read about them by going to "Module Documentation > The Table module > Custom rendering") .
Specifically, by static here I mean that you can't do $foo$ substitution or wildcards or anything in the columnName. Adding $foo$ substitution in a future release would be pretty easy although it doesn't sound like that improvement by itself would help you much. Adding wildcard support (ie for columns.somePrefix*.class)... that's getting a bit further out on a limb than is probably wise. (Not because it's hard but just because it's probably better to explore this sort of requirements with some JS customBehavior a bit more before baking in new features)
Before resorting to custom JS though, the other way you might attack this problem is with pure CSS. The problem I think with using CSS for this, is that between the need to style the cells based on the mere contents of the column header node, and the need to wildcard in our match... pure CSS table styles just don't really have this kind of power yet. Getting there. And the Table module doesn't help because there's no secret class or attribute on the td elements that could help you customize them based on column names.
Which leaves JS.
Splunk UI modules have kind of a lot of moving parts and event-driven behaviors and as a rule if you try and just start writing your own JS independently based on someones generic jquery sample code.... it wont work. This is certainly the case with the table module. Between re-rendering when the job is running/finished and re-rendering when someone changes the page and when someone clicks a sort arrow, your clever generic jquery code is kinda doomed.
So if you work with the system rather than against it, and assuming you're OK with writing, tinkering, cursing at, and maintaining custom Javascript (hey where'd everybody go??)
....here's an example of the sort of thing you need.
1) read the somewhat hidden docs page about Sideview "customBehavior" mechanisms. (Tools > Other Tools > and then scroll down to the last panel)
2) In the XML, give a Table module this param:
<param name="customBehavior">customColumnRendering</param>
3) and then add this to your application.js
if (typeof(Sideview)!="undefined") {
Sideview.utils.declareCustomBehavior("customColumnRendering", function(tableModule) {
var methodReference = tableModule.renderResults.bind(tableModule);
tableModule.renderResults = function(xmlStr) {
// save a copy of the property before we muck with it.
var pristineCopy = $.extend(true,{},this.columnRenderingRules);
// add in some new rules
for (var i=0,len=this.fieldOrder.length;i<len;i++ ) {
var field = this.fieldOrder[i];
if (field.substr(0,10)=="somePrefix") {
this.columnRenderingRules[field] = {"class":"myClassName"};
}
}
// done adding in new rules
// don't forget to call the base implementation of renderResults()
var retVal = methodReference(xmlStr);
// put the clean copy back.
this.columnRenderingRules = pristineCopy;
return retVal;
}
})
}
What you'll get afterwards is a Table where any column whose header label begins with "somePrefix", gets a CSS classname slapped on it's th and td elements, of "myClassName".
... View more