thisViewsheet.scheduleAction(Boolean[,emails])
Specifies whether the Viewsheet should be executed as part of a scheduled task. Set to true to allow the Viewsheet to run as scheduled. Set to false to override the scheduled task setting and suppress Viewsheet execution.
Parameters
Boolean true (default): execute task
false: do not execute task
emails Array of emails
You can use the scheduleAction function to conditionalize the execution of a scheduled Viewsheet task based on actual Viewsheet data. For example, the following script uses the value of a Gauge component to determine whether the Viewsheet task should execute as scheduled.
Example
if (Gauge1.value > 10000) {
thisViewsheet.scheduleAction(true)
}
else {
thisViewsheet.scheduleAction(false)
}
If the scheduled action is a user notification (for example), then the user will receive the alert only when the value of the Gauge component exceeds the threshold.
Use the optional second parameter, emails, to dynamically set the list of emails for the 'Deliver To Emails' scheduled action. The list that you provide in the emails array supersedes any emails specified on the Scheduler Action tab (both for user-scheduled tasks and administrator-scheduled tasks), and automatically enables the 'Deliver To Emails' task action.

Example
if (Gauge1.value > 10000) {
emails = [joe@inetsoft.com, sue@inetsoft.com, mark@inetsoft.com];
}
else {
emails = [joe@inetsoft.com];
}
thisViewsheet.scheduleAction(true, emails);
See Also
Scheduling Reports and Dashboards, in End User, for information on Scheduling Viewsheets.
| << VS.1.1 thisViewsheet | © 1996-2013 InetSoft Technology Corporation (v11.5) | thisViewsheet.isActionVisible(name) >> |