AX2220
Using batch variables with file processing
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, or via batch processing.
Batch variables can be used to change the report in some way as part of file processing. When you set up a file processing task for Scheduler, or when you list the report in a batch, 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.
The 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.
NOTE: Batch variables cannot be used to change the Initial Dynamic View of the report for processing. The Initial Dynamic View is already applied by the time the variables are passed in, and it is not applied again. There is no way to dynamically determine the view to be applied for file processing; it will use whatever view is already applied in the file when the processing begins.
Defining a batch variable
Batch variables are defined on the File Processing Control Sheet. This is an advanced file processing setting that is not available in the File Processing pane.
To define a batch variable, go to the Batch Variables section at the bottom of the File Processing Control Sheet, and type a value into any empty cell in the Variable Names row. The name can be anything you want, but it should reflect what the variable value is used for.
To use the batch variable in the report, you would reference the cell in the Variable Values row directly below the variable name (in this case, cell D66).
You can leave the value blank, or you can type in a value to be used by default. When the file is processed, it will be replaced by whatever value is specified in the Scheduler task settings or the batch settings. (If no value is specified, then the default value in the file is used.)
Using a batch variable
Batch variables can be used when the file is processed by a batch report, or when it is processed by Scheduler's File Processing task.
-
To specify a variable value in a batch report, use the Batch Variables column. Enter each variable/value pair using the following syntax:
variablename=variablevalue
If you want to define values for multiple variables, separate each variable/value pair with a semicolon.
-
To specify a variable value for a Scheduler File Processing task, use the Batch Variables section of the task. Select the Override check box and then type the desired value.