How to get pentaho dashboard tables row count popup alert

532 Views Asked by At

I have a table in my dashboard and I want to display how many rows it contains. Like javascript alert popup.

Note: It must display a popup on the loading dashboard with number of rows given table has.

So far i tried this, but it didn't work. I used these codes in preExecution.

function f(){

var rowCount = document.getElementById('myTableID').rows.length;

alert(rowCount);
}

&

function testClick(e) {

var id = e.tableData.rows.length;

alert(id);

}

Thanks

1

There are 1 best solutions below

0
Helping Hand.. On

Read the document how to use pentaho popup. I am giving over-view, take table component, write query for count. use pentaho popup call the query component inside popup OR use bootstrap's box component and call your query on pageload event.