Reading Text Files from a File System
  • 19 Nov 2020
  • 1 Minute to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Reading Text Files from a File System

  • Dark
    Light

Article summary

Overview

The Read Text File step reads and outputs the contents of a file as plain text.
To add it to a Flow within the Flow Designer, go to the Steps panel, expand the category Integration > File and then, drag a Read Text File component to the workspace.

Example

This example begins with the assumption that the file system contains a text file called Sample Text File.

The example Flow will read this file and display the content on a Form. The Form was pre-built and is simply configured with a Text Box Multi Line form control, label, and a button.

The first step in the Flow will be the Read Text File component.

In the Flow Designer Quick Add window, go to Integrations > All Integrations > File, select the Read Text File step. Click 'Add' to add it to the workspace.


The next step in the Flow will be the pre-built Form to display the file contents. 

Next, configure the Read Text File by selecting it and clicking Edit Input Mappings.
The example Flow requires that Read Text File should read the file C:\SampleTextFile.txt, give the input file Name a mapping type of Constant and a value of the path and file name. With that done, select 'OK' to close the mapping editor.

Configure the Form by selecting it and clicking the Edit Input Mapping link in the Actions Toolbar.

This Flow requires that the Form should display the file contents provided by the Read Text File step. Therefore map the output ReadTextFile_Output to the Form's input FileData. Select 'OK' to close the mapping editor.

Debug

Select the Debug in the top action panel of the Flow Designer to test the flow.

In the debugger, the Form with one field containing data from the text file displays.


Was this article helpful?