Pass parameter to External URL from a table in Dashboard

Hello Team Helical,

I have a tabular report with a column named AssetID. When user clicks on Asset ID, then a link on my portal should open. The URL should pass the AssetID as a parameter so that based on AssetID, the view will open for the user.

This is my sample table:

image

Thank You
Gaboro

1 Like

Hello Gaboro,

You will have to pass the AssetID in the URL that you want. Also, since it is a tabular report, we need to identify each node that you are clicking on and pass the parameters accordingly.

Use the following script in the JS Editor to achieve the above functionality:

hi_container.set('postExecution', function(){

$( document ).ready(function() {

$('table tbody tr').on('click',function (e) {

e.preventDefault();

var rowdata = this;

var urlData=$(this).html();

var data=rowdata.childNodes;

var oem=data[1].innerText;

var itemmaster= data[13].innerText;

var columnIndex=e.target.cellIndex;

if(columnIndex==1){

window.open('Your_URL_GOES_HERE/'+itemmaster,'_blank');

}

});

});

})

Thank You
From Team Helical