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!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

February 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...