Splunk Search

how can I get data from tableelement

flzhang132
Explorer

In my dashBoard,i edit a table in sampleXML,then, The table is converted from sampleXML to HTML. and Converted code
var element3 = new TableElement({
"id": "element3",
"count": 50,
"drilldown": "cell",
"refresh.display": "progressbar",
"totalsRow": "true",
"managerid": "search2",
"el": $('#element3')
}, {tokens: true, tokenNamespace: "submitted"}).render();

so,I wang to know How do I get data from the tableelement, such as taking the first row of the table?
beside, the way I have tried
var myTable = mvc.Components.get('element3');
// Programmatically change a property in the Events table
myTable.getVisualization(function(tableView) {
console.log("tableView ",tableView); //can get value
//console.log("rowExpansionRendererCollection ",tableView.rowExpansionRendererCollection.item(0));// cannot get value
var arraydata = tableView.getRowExpansionRenderers;
console.log("getcell",arraydata); //result is
// [Log] getcell – function (){
// return this.rowExpansionRendererCollection.pluck("renderer")}
// but not array
please help me to find method of table data
thanks very much

0 Karma
1 Solution

niketn
Legend

@flzhang132, since the search search2 populates the data in your table, you should actually be coding search2 results with .on("data", function() {...}

Refer to documentation: http://dev.splunk.com/view/webframework-developapps/SP-CAAAEU6

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

niketn
Legend

@flzhang132, since the search search2 populates the data in your table, you should actually be coding search2 results with .on("data", function() {...}

Refer to documentation: http://dev.splunk.com/view/webframework-developapps/SP-CAAAEU6

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

App Platform's 2025 Year in Review: A Year of Innovation, Growth, and Community

As we step into 2026, it’s the perfect moment to reflect on what an extraordinary year 2025 was for the Splunk ...

Operationalizing Entity Risk Score with Enterprise Security 8.3+

Overview Enterprise Security 8.3 introduces a powerful new feature called “Entity Risk Scoring” (ERS) for ...

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...