Saturday, November 23, 2019

Run Javascript when Spotfire Tab clicked


  • Create TextArea
  • edit html
  • Write a div whith display : none


<DIV id=hiddenActionControl style="DISPLAY: none"><SpotfireControl id="f09f0891f34e4d659d52deae1a41d488" /></DIV>


  • Inside the div create a button (link) and create some ironpython script to execute upon



  • Write a JS as below. This is basically controlling document property written in iron python script for link click.


$('#hiddenActionControl a').click()


  • So basically when tab clicked the link anchor button clicked via javascript code.



  • If you don't want the ironpython script, it's not compulsory.I write below code to change textarea colour on tab click.


var randomColorChange = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
$('#changeMyColor').css('background-color', randomColorChange);


Spotfire Automation Job


  • Go to Tools>> Automation Job Builder
  • Keep adding the steps you needed. These will be steps or tasks
  • Once done save it as xml

  • Try running/testing by executing locally and on server

  • The files Spotfire.Dxp.Automation.ClientJobSender.exe and Spotfire.Dxp.Automation.ClientJobSender.exe.config are located in the same directory.
  • Change username and pwd in Spotfire.Dxp.Automation.ClientJobSender.exe.config so that exe should be use correct spotfire username and pwd 

  • Go to Windows schedule task on spotfire server and Create new task to schedule a job to be executed with the Spotfire Automation Services Client Job Sender, use Windows Task Scheduler
  • In Windows Task Scheduler, create a new task that executes the Client Job Sender, provide arguments to it as described in Configuring the Client Job Sender, and set it to run periodically as needed.
  • programme/script   G:\Spotfire\Automation_Services\Spotfire.Dxp.Automation.ClientJobSender.exe
  • Argument : "http://localhost" "G:\Spotfire\Automation_Services\automation.xml"
  • The status of running jobs and the jobs history is available in Spotfire Server, on the Automation
  • Services tab of the Monitoring & Diagnostics area. For more information, see the Spotfire Server help.