Getting File Data From a Document
  • 04 Jan 2023
  • 1 Minute to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Getting File Data From a Document

  • Dark
    Light

Article summary

Overview

Users can access data from documents that have been uploaded to Decisions. This allows users the flexibility of sourcing information for Flows and Projects from a pre-existing outside source. 

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.

   Airports.txt  


  1. From the Designer Project, right-click the folder, click Manage, and select Get Designer Folder ID.
  2. Click Copy Text and click DONE.
  3. In the Designer Project, click CREATE FLOW to create a new Flow.
  4. From the Flow Designer, add a GetByFolderID step from the INTEGRATION >  INTERAL SERVICES > DOCUMENTSERVICE category in the Toolbox panel.
  5. On the Properties panel, click Unknown next to the folder ID field and select Constant. Paste in the copied Id from the folder. 

  6. Add a ForEach Step 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.
  7. 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.
  8. 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.
  9. Attach a Show Form step from the FAVORITE STEPS category in the Toolbox panel to the Done path of the ForEach Step and click PICK OR CREATE FORM on the Properties panel. Select CREATE, select Form, name the Form, and click CREATE.
  10. Configure the Form with a Text Box Multi Line component (DocumentInfo) and Button component (Done). Click Save and close the Form.
  11. Connect the Done path of the Get String from Bytes to the ForEach Step. Select the Form and click Unknown next to the Document Info field and select Select From Flow. Select GetStringFromBytes_Output and click DONE.
  12.  Connect the Done path of the Form to the End step. Click Save to save changes to the Flow.  



Debug 

  1. Click Debug on the top action bar. 
  2. 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?