How to Access a List of Documents In a Flow?
Comments
-
Hey there, I have an API call that creates some documents in my flow through a For Each loop from information off of this external database. How do I access this list of documents I just created later on?
-
Hi, what kind of information are you hoping to output?
If you want to output a simple list of filedata for the documents you are creating in the flow, you can refer to this example on [url=https://documentation.decisions.com/docs/dynamically-building-a-list-of-items]Dynamically Building a List of Items[/url] to see how this can be accomplished. First, you would create an list of [b]filedata[/b] with a [b]Create Data[/b] step; this step can be anywhere in the flow prior to the For Each loop. Setting the list input to NULL is a good way to ensure that the list is empty on creation so you know that every run through this flow will start with a fresh list. Now within the For Each loop and after the document has been created, you would use an [b]Add Item to List[/b] step to add the filedata of the document onto the list of filedata variable that was created.
As in the example, we should make sure that the [b]output for the item being added[/b] to the list step uses [b]Change Value[/b]. Using Rename will make a new list instance each time under a new name, while Change Value will add the item to the existing list by "changing the value" of the same, currently existing list and inserting the new entity. Here is a documentation on the different types of input and output data mapping which can help elaborate on what I mentioned above in further detail if you need it: [url=https://documentation.decisions.com/docs/input-output-types-overview]Input and Output Mapping Type Overview[/url].
Once you make the list, you can click on the [b]End Step[/b] to specify the list as an output; this documentation goes into specifying outputs on end steps: [url=https://documentation.decisions.com/docs/set-flow-output-values]Set Flow Output Data[/url].
In the case where you expect to [b]receive large files[/b], [b]a large amount of files[/b], or want to [b]refer to these files at a later time[/b] after this flow has completed, wed recommend using [b]File References[/b]. These do require you to save the files in Decisions, but it will make it much simpler and less memory intensive to grab an entire list of File References from the specific folder containing all the saved files (using a [b]Get FileReferences in folder[/b] step).
Here are some documentation that can help with setting up a list of File References to be outputted instead:- [url=https://documentation.decisions.com/docs/file-references]File References[/url]
- [url=https://documentation.decisions.com/docs/understanding-entityid-folderid-and-entityfolderid]About FolderID, EntityID and EntityFolderID[/url]
Both ways will accomplish what you need, and its up to your discretion to decide which one is the better method to implement based on your individual use case. I hope this reply answers your inquiry!
-
You should then have the option to pick the Site and Lists/Libraries and select Add. You will see the List in the part beneath once you add it
[url=https://www.yourtexasbenefits.biz/]YourTexasBenefits[/url]
-
[quote=Halley36]You should then have the option to pick the Site and Lists/Libraries and select Add. You will see the List in the part beneath once you add it
[url=https://www.yourtexasbenefits.biz/]YourTexasBenefits[/url][/quote]
Hi there,
Im confused as to what part of the process youre appending this onto. It looks like youre trying to add additional notes to one of my answer details, but what aspect on it? Perhaps with more clarity into this, I can elaborate further on that aspect for you. Is there any additional questions you have on this topic that I can help answer? Im unable to tell if my answer previously sufficed to solve any possible queries you have on this.
Howdy, Stranger!
Categories
- 4.1K All Categories
- 61 General
- 11 Training
- 201 Installation / Setup
- 1.1K Flows
- 106 Rules
- 260 Administration
- 212 Portal
- 489 General Q & A
- 693 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 178 Pages
- 5 Process Mining
- New Features
- 178 Datastructures
- 69 Repository
- 219 Integrations
- 28 Multi-Tenant
- 27 SDK
- 76 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 66 Lunch And Learn Questions