thisViewsheet.taskName

Property is read-only. It cannot be set in script.

Returns the name of the scheduled task currently executing the Dashboard, which can be used together with thisViewsheet.scheduleAction(Boolean[,emails]). See Schedule a Dashboard in Use the Portal and Schedule in Manage the Server for more information about scheduled tasks.

Example

Trigger different emails based on executing task
if (thisViewsheet.taskName ==  'Task5') {
  emails = ['joe@inetsoft.com', 'sue@inetsoft.com', 'mark@inetsoft.com'];
}
else {
 emails = ['joe@inetsoft.com'];
}
Text1.text = 'Generated by scheduled task' + thisViewsheet.taskName;
thisViewsheet.scheduleAction(true, emails);