Dashboards & Visualizations

cell render value is undefined

BDavis
Loves-to-Learn

I am using a cell renderer, and when assigning the cell value to a var used by my script, the var shows as undefined, even though the celldata.value shows a valid string.  The basics of the js code are:

canRender: function (cellData) {
console.log("cellData.field ", cellData.field);
if (cellData.field === 'audiofiles') {
return true;
}
else {
return false;
}

render: function ($td, cellData) {
console.log("cellData.value ", cellData.value);
var mysoundfiles = cellData.value.tostring;
console.log("mysoundfiles ", mysoundfiles);

 

and the results from the console log are:

cellData.field last_audio       

cellData.field audiofiles
cellData.value (3) ['LOWRATES.wav RES1.wav', 'RES1.WAV CATSTROP.WAV', 'TLPRESNAP.wav']
mysoundfiles undefined

when trying to use the cellData.value,  it always returns 'undefined'

Oddly, this code was working at one time, then just stopped working for some reason. 

Any help is greatly appreciated! .. 

Labels (1)
0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Unmerging HTML Tables

[Puzzles] Solve, Learn, Repeat: Unmerging HTML TablesFor a previous puzzle, I needed some sample data, and ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...

AI for AppInspect

We’re excited to announce two new updates to AppInspect designed to save you time and make the app approval ...