scheduleAction(Boolean[,emails])

Specifies whether the report should be executed as part of a scheduled task. Set to false (for any element in the report) to override the scheduled task setting and suppress report 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 report task based on actual report data. For example, the following script uses the value in a text element to determine whether the report task should execute as scheduled.

Example

if (Text1.value > 10000) {

  Text1.scheduleAction(true)

}

else {

  Text1.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 'Text1' component exceeds the specified 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 (Text1.value > 10000) {

  emails = ['joe@inetsoft.com', 'sue@inetsoft.com', 'mark@inetsoft.com'];

}

else {

  emails = ['joe@inetsoft.com'];

}

Text1.scheduleAction(true, emails);

See Also

Scheduler, in Administration Reference, for information on administrator scheduling.

Scheduling Reports and Dashboards, in End User, for information on end-user scheduling.

<< keepWithNext © 1996-2013 InetSoft Technology Corporation (v11.5) adhocEnabled(Boolean) >>