KB1025

Setting a batch variable for use with Scheduler without using batch processing

Summary

Scheduler's File Processing task can generate and pass batch variables directly to a report without having to use batch processing. This article provides an example of how to create a Scheduler File Processing task to pass a batch variable to a report.

Details

Batch variables can be used to change a report in some way as part of file processing. When you set up a file processing task for Scheduler, you can define values for the variables. When the report is processed, the variable values are temporarily placed in designated cell locations in the report. If the report is configured to reference those cells, then the report will change based on the variable values.

Batch variables can be used for virtually anything within the report. You could reference them in report titles, or in data query settings, or within the file processing settings. The usage of the variables is entirely user-definable.

When you set up file processing for a report, you can define one or more batch variables to be used when processing the report via Scheduler's File Processing task.

Resolution

In the following example, an Income Statement Summary report has a batch variable named DateTime. This batch variable is set up to receive a date-time value into cell D77, where it can be used for functions such as header displays, filtering, and field definitions.

Example batch variable defined in the File Processing Control Sheet

In order to dynamically generate and pass a variable value for use in file processing, the Scheduler job is set up with two tasks as follows:

  • The first task uses Process Document List to process a separate report that has been configured to calculate the date-time value. This date-time value is passed back to Scheduler.

  • The second task uses File Processing to pass the variable value to the income statement report and perform file processing.

To configure a Scheduler job to generate and pass a batch variable:

  1. Create a report to generate the date-time value for the variable. In this example, a report named DateTimeStamp has a date-time value calculated in cell A1, using the following formula:

    =TEXT(NOW(),"YYYY-MM-DD HMM am/pm")

    NOTE: When this report is processed by Scheduler, the calculated date and time value are based on the local time zone of the Scheduler server. For Axiom Cloud systems, the Scheduler servers are in the Coordinated Universal Time (UTC) time zone by default.

  2. Create a Scheduler Job and add a Process Document List task to the job.
  3. In the Task Details section, click the Add button and select the DateTimeStamp report from Axiom Explorer.

  4. In the Post-Processing Job Variables section of the Process Document List task, specify the following:

    • Workbook location: The location in the workbook to find the value to be passed to Scheduler.
    • Job Variable: The name of the job variable to use the passed value.

    In this example, the value created in cell A1 of the DateTimeStamp report is passed to the DateTimeVar job variable.

  5. Add a File Processing task to the Scheduler job and click the Browse button to select the report to process—in this example, the Income Statement Summary report.
  6. In the Batch Variables section of the File Processing task, do the following in order to pass a value to the DateTime batch variable:

    • Select the Override check box so that the Value box becomes editable.

    • Set the Value for the DateTime variable to the job variable name defined in step 4. Enclose the job variable name in curly brackets, such as {DateTimeVar}.

  7. Save and run the Scheduler job to generate the report output.

When the job is run, the DateTimeVar job variable is set to the date-time value passed from the DateTimeStamp report. The DateTime batch variable is then set to this date-time value, and passed into the income statement report by placing the value in cell D77. The file processing action then uses this batch variable value as the file is processed

Outcome

The report output uses the calculated batch variable received by Scheduler and displays the value within the report.

See also

Article information

Category

Reports

Applies To

All versions

Tags

Batch Variables, Scheduler, Scheduler Jobs, Process Document List, Scheduler File Processing task

Issue Number(s)

N/A