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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...