cancel
Showing results for 
Search instead for 
Did you mean: 

Keep changes made via script to a widget when downloading

Laflet
9 - Travel Pro
9 - Travel Pro

I have made several changes via widget scripts, such as changing the background color of specific cells. When I Download this to Excel or PDF, these changes don’t come through. Is there anyway to make these changes come through on Download?

2 REPLIES 2

Ravid_PaldiTeam
9 - Travel Pro
9 - Travel Pro

Hi @Laflet , 

 

I'll devide the answer into two parts: Excel and PDF. 

Support for Custom Scripts within PDF

- Genrally speaking, your dashboard and widget scripts should be working fine while exporting a dashboard  to PDF but if you are exporting a specific widget to PDF than dashboard/app events won't be triggered as well as some other diffrences in the functionality of your code. 

- If you have widget scripts that seems to not be applied while exporting to PDF - feel free to paste them here and we'll do our best to assist in explaingng what you shold modify in them. 

 

Support for custom Scripts within the excel export

- Unlike the PDFs generation process, which is done behind scenes within the a server side instance of the Sisense App, the generated excel is done in a completly seprate server side module that doesn't have the Sisense App scope and therefore there is no way to run custom scripts on the native excel export. 

- I'm not sure what you are tryng to customzie within the excel but you should check out the following commercial plugins: 

Export Modifications  - A Sisense supported plugin that allows you to do some nifty modifcations to youe excel

Export Button - A Paldi Solutions plugin that utilizes our home grown advanced exporting module that allows you many enhanced capabilites in conjunction to the native Sisense excel export. Amongs the advantages you can find: 

- Abilty to exprot all widget types (not only pivots) into one unified excel 

- Export more then 50K rows within the Excel 

- Ability to fully customize your export like inluding dashboard filter selections, branding and other things 

 

A General Advise 

- It sound like you are trying to apply global styling to your widget. In such cases we highly reccomend to make the effort and defelop a custom Sisense plugin to manage the styling in one centerlized place or to check out our Widgets Script Manager which saves you the hassle of developing a plugin and allows you some advanced smart triggering rules to triger your scripts (for example you can trigger a script to run on a specific widget type only for users from a sepcific user group). 

 

Feel free to reach out if you need furter assistanve/info, we're always happt to help (: 

Paldi Solutions - Gold Certified Partner
 

 

 

Laflet
9 - Travel Pro
9 - Travel Pro

This is the script I’m running. Changes the background color of a cell to red based on another cell. This modification doesn’t download to pdf.

widget.on('ready', function(se, ev){

$("tbody tr" , element).not('.wrapper, .p-head-content').each(function(){
var cell = $(this).children().last().prev();

var cell_value = cell.text()
if (cell_value.match(/Key word.*/)) {
$(cell.prev().prev()).css("background-color", 'red');
}
});
});