Reading Text Files from a File System

Last Updated: 12/04/2015 Introduced in Verision: 2.0

The Read Text File component reads and outputs the contents of a file as plain text.

Add it to a flow in the Flow Designer, in the Toolbox panel, by expanding the category Integration > File and dragging a Read Text File component to the workspace.


The example begins with the assumption that our file system contains a text file called “Daily Status Report,” which contains text identifying what an employee accomplished for the day.

The example flow will read this file and display its content inside of a form field. The form, Display Employee Status Report, already exists, and is simply configured with a Text Block form control, label, and a button:
The first step in our flow will be the Read Text File component.


In the Flow Designer start-up window, under the category Integrations > All Integrations > File, select a Read Text File component. Click Add to add it to the workspace. 


The next step in our flow will be the form we use to display our file contents – Display Employee Status Report – which is in the Toolbox panel, under the category Forms [Interaction] > [Current Folder].



Next, configure Read Text File 1 by selecting it and clicking the Show Mapping Editor link in the Properties panel.

Our example flow requires that Read Text File 1 should read the file “C:DailyStatusReport.txt,” so give the input fileName a mapping type of Constant and a value of the path and file name. With that done, we can click OK to close the Mapping Editor.



Configure Display Employee Status Report by selecting it and clicking the Show Mapping Editor link in the Properties panel, or from its Actions menu.



Our example flow requires that Display Employee Status Report should display the file contents outputted by Read Text File 1, so we will map the output ReadTextFile1_Output to our form’s input FileData. After we’ve clicked OK to close the Mapping Editor, and then saved our flow, we’re ready to test it.



In the debugger, we’re presented with a form with one field containing the desired data.



Additional Resources