AX1773
File collect examples
The following examples are intended to show common file collect configurations. These examples use batch processing to generate snapshots and then collect the snapshots into report packages. The second example also uses the "attach files separately" option to email collected files at a different level than the file collect operation.
Simple file collect example
This example does the following:
- Snapshot file processing on three different reports, using multipass to generate snapshots per region
- File collect processing to collect the region snapshots into a report package, and email the package to the region owner
The batch file lists the three snapshot reports, then the file collect report at the end.
Batch file to create snapshots and then collect them into packages
The first three reports are set up using standard snapshot processing, to process each report by VP and then create a snapshot. The snapshot output files are prefixed with the VP name and saved to a designated output folder. The following screenshot shows an example of the snapshot settings.
Snapshot settings to generate reports by VP
After the first three reports in the batch are processed, the folder containing the snapshot output files looks something like the following screenshot. There are three snapshot reports for each VP. The file collect report will collect the three reports into a report package for each VP.
Output files after running the three snapshot reports using multipass processing
In this example, the file collect setup is fairly straightforward, because the goal is to create one report package for each VP and deliver that package to the VP. In the File Processing task pane, the process is configured for multipass processing by Dept.VP.
Multipass settings for the file collect operation
The File Collect Configuration Sheet is set up as follows:
-
The Common Files column is used to start each report package with a cover sheet.
-
The GetCurrentValue function is used in the Email to field, to dynamically change the email for each pass. In this example, the target email addresses for each VP are being held in a table column, so we can use
GetCurrentValue ("Dept.VP.Email")
to return the relevant email address. -
A (Multipass only) Filter template of
{Dept.VP}*.xlsx
is used to dynamically filter the file list to only return the snapshots that start with the current VP name. For example, when the current VP is Bree Sigman, the filter template is resolved asBree Sigman*.xlsx
, which will collect the first three files in the example snapshot folder shown previously. - The GetCurrentValue function is used in the output file name, to prefix the name of the resulting report package with the VP name.
File Collect Configuration sheet to create and deliver the report packages to VPs
Note the following about this example File Collect Configuration Sheet:
-
The file list currently shows all files in the source folder path, because the multipass filter template is only applied during multipass processing. If you refresh the list manually as shown here, the filter template is ignored. Unfortunately there is no way to preview the resulting file lists when using the filter template.
-
The GetCurrentValue functions currently return information for user jdoe, because that is what is set as the Current Value Defaults for the source columns on the File Processing Control Sheet. When multipass processing is performed, the functions will return the values relating to the current pass VP. It can be useful to set current value defaults so that the functions do not return errors when multipass processing is not being performed.
When the file collect report is processed at the end of the batch, it creates the report packages for each VP. The cover page and the three report snapshots for each VP have been placed in the output files.
Output files after running file collect
Additionally, each report package has been emailed to the appropriate VP:
Email to VP after running file collect
Two-phase file collect example
This example is similar to the first example, except that now we want to create the file collect packages at a different level than the email recipients. To do this, we need to use a two-phase file collect operation, where the first file collect phase creates the report packages, and the second file collect phase attaches multiple individual report packages into emails. This example does the following:
- Snapshot file processing on three different reports, using multipass to generate snapshots per department
- File collect processing to collect the department snapshots into a report package by region
- File collect processing to email the region snapshots to the appropriate VPs, where some VPs are responsible for multiple regions
The batch file lists the three snapshot reports, then two file collect reports at the end.
Batch file to create snapshots, then collect snapshots into region packages, then email the packages to VPs
The first three reports are set up using standard snapshot processing, to process each report by department (Dept) and then create a snapshot. The snapshot output files are prefixed with the department code and saved to a designated output folder. The following screenshot shows an example of the snapshot settings.
Snapshot settings to generate reports by department
After the first three reports in the batch are processed, the folder containing the snapshot output files looks something like the following screenshot. There are three snapshot reports for each department.
Output files after running the three snapshot reports using multipass processing
The first file collect report (phase 1) will collect the department reports into a report package per region. In the File Processing task pane, the process is configured for multipass processing by Dept.Region.
Multipass settings for the phase 1 file collect operation, to create region packages
For phase 1, the File Collect Configuration Sheet is set up as follows:
-
The Common Files column is used to start each report package with a cover sheet.
-
There are no email settings configured, because phase 1 just creates the report package files. Phase 2 emails them.
-
A (Multipass only) Filter template of
{Dept.Dept}*.xlsx
is used to dynamically filter the file list to only return the snapshots that start with the department codes for the current region. For example, when the current region is US West, the filter template will be resolved using department codes such as 40000*.xlsx, 40500*.xlsx, 44000*.xlsx (and so on, depending on which department codes belong to the current region). - The GetCurrentValue function is used in the output file name, to prefix the name of the resulting report package with the region name.
File Collect Configuration sheet to create the region report packages
Note the following about this example File Collect Configuration Sheet:
-
The file list currently shows all files in the source folder path, because the multipass filter template is only applied during multipass processing. If you refresh the list manually as shown here, the filter template is ignored. Unfortunately there is no way to preview the resulting file lists when using the filter template.
-
The GetCurrentValue functions currently return information for region Corporate, because that is what is set as the Current Value Defaults for the source column on the File Processing Control Sheet. When multipass processing is performed, the functions will return the values relating to the current pass region. It can be useful to set current value defaults so that the functions do not return errors when multipass processing is not being performed.
When the phase 1 file collect report is processed at the end of the batch, it creates the report packages for each region. The cover page and the report snapshots for all departments in the region have been placed in the output files.
Output files after running file collect
The second file collect report (phase 2) will send an email to each VP and attach the appropriate region files to the email, where some VPs are responsible for multiple regions. In the file processing task pane, the process is configured for multipass processing by Dept.VP.
Multipass settings for the phase 2 file collect operation, to email packages to VPs
An email could have been sent as part of the phase 1 file collect, but in that case there would be one email per region, so some VPs would have received multiple emails. If you want to consolidate the emails in cases where there is not a one-to-one correlation between the output files and the email recipients, you can use this two-phase collect approach instead.
For phase 2, the File Collect Configuration Sheet is set up as follows:
-
The GetCurrentValue function is used in the Email to field, to dynamically change the email for each pass. In this example, the target email addresses for each VP are being held in a table column, so we can use
GetCurrentValue ("Dept.VP.Email")
to return the relevant email address. -
The option Attach each file separately is enabled, so that the files in the file list will be attached to the email as individual files, rather than being collected into an output file. This option is only valid when Save or email generated files is set to Email File.
-
A (Multipass only) Filter template of
{Dept.Region}*.xlsx
is used to dynamically filter the file list to only return the files that start with the region names for the current VP. For example, when the current region is Bree Sigman, the filter template will be resolved using region names such as France*.xlsx, UK*.xlsx (and so on, depending on which regions belong to the current VP). - The output file settings are blank, because no output file is being generated in this phase. The files in the file list are being attached to the email directly.
File Collect Configuration sheet to email the region report packages to VPs
Note the following about this example File Collect Configuration Sheet:
-
The file list currently shows all files in the source folder path, because the multipass filter template is only applied during multipass processing. If you refresh the list manually as shown here, the filter template is ignored. Unfortunately there is no way to preview the resulting file lists when using the filter template.
-
The GetCurrentValue functions currently return information for user jdoe, because that is what is set as the Current Value Defaults for the source column on the File Processing Control Sheet. When multipass processing is performed, the functions will return the values relating to the current pass VP. It can be useful to set current value defaults so that the functions do not return errors when multipass processing is not being performed.
When the phase 2 file collect report is processed as the last item in the batch, the relevant region report packages are emailed to the appropriate VPs. In the following example, this VP is responsible for two regions, so two report packages were attached to the email.
Email to VP after running file collect (two region packages attached as individual files)