Skip Ribbon Commands
Skip to main content
SharePoint

Write Data Item Values to a Delimited Text File


Using the Write Text File activity you can write data item values to a delimited text file. A delimited text file is a file in which each line of text has unique data. And each line is separated by a known character (for e.g. tab, new line). This topic discusses writing values from a collection data item to a file.
 
To write data item values to a delimited text file, complete the following steps:
  1. Check out and open the process you want to edit.

  2. In the Toolbox pane, click Document. A list of activities is displayed.

  3. Double-click or drag the Write Text File activity into the process.

  4. Link the activity appropriately with other activities.

  5. Right-click the Write Text File activity. A shortcut menu is displayed.

  6. Select View Properties. The Write Text File window is displayed.

  7. Click the File Options tab. The Write Data Collection to Text File option is selected by default.

  8. Check the Select Collection Data Item checkbox. The corresponding data item field is enabled.

  9. Select a collection data item from the list of available data items.

  10. In the Field delimiter field, select the Data Item or Literal Value editor and set the field to a value that is a delimiter to be inserted between each value to write.

  11. In the Record delimiter field, select the Data Item or Literal Value editor and set the field to a value that is a delimiter to be inserted between each record.
     
    Note:
    If you want to use a delimiter as part of the text you are writing, then select the Use Encapsulation Character check box and define the character using an appropriate input field editor.


  12. In the Value to Write field, click the Data Item icon. A drop-down list is displayed.

  13. Select a data item. The selected data item name is displayed in the field.
     
       
  14. Click the plus sign and repeat step 12 and 13 to write more data items.

    Note:
    If you want to use headers in your text file, select the Include Headers check box.


  15. Click the Output Destination tab. The corresponding screen is displayed.

  16. In the File Encoding field, click the drop-down arrow. A drop-down list is displayed.

  17. Select ASCII or UTF-8.

    Note:
    You select ASCII or UTF-8 depending on your platform and locale.


  18. In the Output File Name field, select the appropriate input field editor and set the field to a value that is a file name.

  19. From the If the file already exists section, select Overwrite the file or Increment the file name.

    Note:
    Select Overwrite the file to replace the existing file. Select Increment the file name to save the updated version of the existing file.


  20. In the Output File Location field, select the appropriate input field editor and set the field to a value that is a file location on your system.

  21. In the Authentication section, select the Run as BPM Server or Specify credentials option.

    Note:
    If you select Run as BPM Server, access will be granted or rejected based on the BPM Server credentials. If you select Specify credentials, complete the Username, Password, and Include domain fields using the appropriate input field editors. The Include domain check box is optional.


  22. Click OK. You configured the activity to write data item values to a delimited text file.

  23. In the Output File Location field, select the appropriate input field editor and set the field to a value that is a file location on your system.
Related Topics
Find and Replace Data Item Tokens in a Text File Template
Write All Solution and Process Data Item Values to a Text File

Source
BPM Designer Topics > Overview of Activities and Activity Topics > Document Activities > Write Text File
Last modified at 7/31/2020 12:12 PM