PMG’s For Each Request File action
Iterate through your files
Digital paperwork can sometimes be just as unwieldy to manage as the old-fashioned kind. Say you build a form that allows a user to attach multiple files to a request, but you need to do something with each file – such as uploading each file individually to a network share or to SharePoint.
The For Each Request File action was created specifically for this purpose. This new action allows you to construct a loop and iterate through all the submitted files. Each loop will store the current file into the specified “Loop File Name” (a file variable).
One of the many possible use cases for this action is when you want to validate each attachment with a manual review. Perhaps you are requesting a user to upload all of their certifications. You may have a single question on the request asking for the certifications, but then you still need to have each document validated for authenticity.
To insert the For Each Request File action into a workflow, you can set it up as a serial action using the Next Loop action, as seen below.
Or, it can be set up as a parallel action, which doesn’t require the use of the Next Loop action.
In each of these scenarios, a human action is used to create a task for evaluating each specific file attachment.
How to Configure
The action requires configuration of two properties, plus an additional property if you need to limit the questions to which this functionality applies.
- Loop File Name – the file variable in which to store the current request file. Note: this variable needs to be set up in the Start step of the workflow with the type of file.
- Execution/Scope – this determines if the For Each Request File action will be processed in serial or parallel. It is important to note that by default, this will be set as Serial/Global. You will need to change this value to Parallel/Local if you want the action to run in parallel.
Now you’re all set to iterate to your heart’s content!