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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...