Forum Discussion

cartercjb's avatar
03-11-2022

DYNAMIC EMAIL REPORT SETTINGS

 

Hi Sisense Community! 

Please reference the screenshot below referenced in the following questions when configuring a dashboard's email settings: 

  1. Is there a script to only export the active/visible widgets based on the Tabber selection? 
  2. Is there a script/way to automatically run this for each location shown in the selected filter? So this would deliver 7 separate emails to the subscriber's inbox - one for each of the 7 locations. The Directors currently go into this report and filter locations one by one to then export & email a copy to the appropriate building manager. I'm looking for a way to remove that step and have it sent directly to the Director's inbox who can forward it from there. Note* the managers do not have access to Sisense otherwise I would have them just subscribe directly. 

Thanks!

-Carter

4 Replies

Replies have been turned off for this discussion
  • HamzaJ's avatar
    HamzaJ
    Data Integration

    Hi cartercjb ,

    I have not come across situation where I had to hide a widget in the PDF. I know it is possible with a dashboard script:

    dashboard.on('widgetready', function (se, ev) {
    	
    	//widgetid to hide from PDF
    	widgetid = '3aecd1801eafb16865d4c87lre'
    	
    	if(ev.widget.oid == widgetid)
    	{
    		$('[widgetid=' + widgetid + ']').closest('.u-r').height(0)
    	}
    });

    You could use this script (extend it with the other IDs). 

    For your second question; This is something I came across. We use a python script to loop through a list. It first changes the filters and then sends it to a specified user. For every user a different filter-setting is used. 

    In theory you could extend this script to also add the script to the dashboard for each day and auto change the widgetid based on the day. Do you have experience with Python? I can then share my regular script and you can adjust it. 

    Hamza

    • cartercjb's avatar
      cartercjb
      ETL

      Thanks, Hamza HamzaJ . I have entry level experience with Python. How advanced is your script? If not advanced, are you able to add comments to the different section(s) outlining the purpose? Let me know if you have any follow up questions or want to take this offline to test. Thanks!

      -Carter

      • HamzaJ's avatar
        HamzaJ
        Data Integration

        Could you export the dashboard to a dash-file and share it with me? I'll copy paste the filter-jaql and send you a ready-to-test python file. If you prefer not to, I can share the python file with some comments