Download files locally
Comments
-
There are a couple ways you can go about this
1) Automatically download a file:
To do this, you can pair the Load From File Data step and the End Form Session step together. Pass the FileData of the File into the Load From File Data step, this will return a FileReference.
Then in the settings for the End Form Session step, change the behavior to "Open URL." This will change the input for the step to be a string value for the File URL. We can get this File URL from the output of the Load From File Data step.
Please note that the End Form Session step will change the context of the flow from the user that started the flow to the System. This will interfere with any forms that are assigned In Session.
Step Documentation:
- Load From File Data step: https://documentation.decisions.com/step-library/docs/load-from-file-data
- End Form Session step: https://documentation.decisions.com/step-library/docs/end-form-session
2) Form with download prompts:
This method will involve a form with a data repeater to display a download button for each file in the list of files. For each file in the list, you will want to use the Load From File Data to get the File Reference for each file and add the File References to a list using the Add Item to List step.
This is how I have mapped the inputs for the Add Item to List step. Please note that it is important that your Original List in the input is the same variable in the outputs New List.
I have set up a data repeater that displays the file name next to a file download button for each file.
For each of these Data Repeater components, you will want to map the associated Form Data to the repeater component.
This is how the data repeater looks when I added it to the form.
Finally, pass in the List you created in the For Each loop as the input to the Display Files form.
Documentation:
- ForEach step: https://documentation.decisions.com/step-library/docs/foreach-step
- Load From File Data step: https://documentation.decisions.com/step-library/docs/load-from-file-data
- Add Item to List step: https://documentation.decisions.com/step-library/docs/add-item-to-list
- Data Repeaters: https://documentation.decisions.com/docs/creating-data-repeaters
Howdy, Stranger!
Categories
- 4.2K All Categories
- 67 General
- 11 Training
- 202 Installation / Setup
- 1.1K Flows
- 106 Rules
- 262 Administration
- 212 Portal
- 490 General Q & A
- 695 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 52 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 179 Pages
- 5 Process Mining
- New Features
- 179 Datastructures
- 69 Repository
- 221 Integrations
- 28 Multi-Tenant
- 27 SDK
- 78 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 83 Lunch And Learn Questions