Reading Text Files from a File System
  • 12 Mar 2021
  • 1 Minute to read
  • Dark
    Light

Reading Text Files from a File System

  • Dark
    Light

Article Summary

Overview

The Read Text File step is a Flow step in Decisions, that reads and outputs the contents of a file as plain text that may be used throughout the Decisions environment. 

The following document demonstrates how to use a Read Text File step and a Form step to output text to a Flow in Decisions. 




Example

  1. From a Designer Project, click the CREATE FLOW button on the Global Action Bar; select Flow, provide a Name, then click CREATE.
  2. From the Flow Designer, attach a Read Text File step from the FILE MANAGEMENT category of the Toolbox tab. 
  3. Navigate to the Read Text File step's Properties tab by selecting it.  Under INPUTS > File Name, Constant map the location of a text file in the File System
    For this example the file is located at C:\\TestFolder\ReadThis.txt. 

  4. From the FAVORITE STEPS category of the Toolbox, attach a Show Form step to the Done path of the Read Text File step. Navigate to the Show Form step's Properties and click PICK OR CREATE FORM; select CREATE, choose Form, provide a Name, then click CREATE once more. 
  5. Design a Form using a Text Box Multi Line component, a Label, and a Button
    This Form will serve as a display Form for the Output of the Read Text File step. 

  6. Save the Form, then close the Form Designer via X

  7. Back in the Flow Designer, navigate to the Form step's Properties and map ReadTextFile1_Output to the Input of the Text Box. Then, connect the Outcome path of the Form step to the End step.

  8. Save the Flow, then if desired, close the Flow Designer. 


Debug

  1. From the Flow Designer, select the Debug link on the top action bar. 
  2. Click START DEBUGGING.
    If correctly configured, upon run, the Form will display the contents of the text file. 

  3. Verify the contents of the file by comparing it against the Read Text File step's output. 

Was this article helpful?