Getting File Data From a Document
- 18 Sep 2024
- 2 Minutes to read
- Print
- DarkLight
Getting File Data From a Document
- Updated on 18 Sep 2024
- 2 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Users are able to access data from documents that have been uploaded to Decisions. This allows users the flexibility of sourcing information for Flows and Projects from an outside pre-existing source.
For more information on how to add a document, see Adding Documents To The Portal.
Below is a downloadable example to import into Decisions.
Example
The following example will source data from an uploaded document in a folder and display it on a Form. The document used in this example is a list of airports and can be downloaded below.
- From the Designer Project, right-click the folder, click Manage, and select Get Designer Folder ID.
- Click Copy Text and click DONE.
- In the Designer Project, click CREATE FLOW and select Flow. Name the Flow and click CREATE.
- From the Flow Designer, add a GetByFolderID step from the INTEGRATION > INTERAL SERVICES > DOCUMENTSERVICE category in the Toolbox panel.
- On the Properties panel, click Unknown next to the folder ID field and select Constant. Paste in the copied Id from the folder.
- Add a ForEach step from the Toolbox panel to the Get By Folder ID step by navigating to FLOW MANAGEMENT > ITERATION. On the Properties panel, click EDIT under the Collection field. Select Get By Folder ID 1_Output and click DONE.
- Add a GetDocumentData step from the INTEGRATION > INTERAL SERVICES > DOCUMENTSERVICE category in the Toolbox panel to the Next path. On the Properties panel, map Item.DocumentID to the document ID field.
- Add a Get String From Bytes step from the DATA > TEXT category of the Toolbox panel to the Get Document Data step. On the Properties panel, map GetDocumentData_Output.Contents to the Bytes field under the INPUTS category by clicking Pick.
- Attach a Show Form step from the FAVORITE STEPS category in the Toolbox panel to the Done path of the ForEach Step and create a new Form.
- Configure the Form with a Text Box Multi Line component (DocumentInfo) and Button component (Done). Click Save and close the Form.
- Click Unknown next to the Document Info field and select Select From Flow. Select GetStringFromBytes1_Output and click DONE.
- Connect the Done path of the Get String From Bytes to the ForEach Step. Connect the Done path of the Form to the End step. Click Save to save changes to the Flow.
Debug
- From the Flow Designer, select the Debug link from the top action bar.
- Click the START DEBUGGING button. The Flow runs in the Debugger. The Form opens and the Document's data is displayed in the Rich Text Display control on the Form.
For further information on Flows, visit the Decisions Forum.
Was this article helpful?