Table of Contents

Search

  1. Preface
  2. Introduction
  3. Dashboard
  4. Resources
  5. Workflows
  6. Task Reference
  7. Services Overview
  8. Users
  9. Logs and Reports
  10. Encryption
  11. System
  12. Appendix
  13. Glossary Terms

Managed File Transfer User Guide

Managed File Transfer User Guide

Example 2: Printing the Values of a RowSet Variable Using a Loop

Example 2: Printing the Values of a RowSet Variable Using a Loop

It is sometimes useful to troubleshoot Projects by using the Print task to print the values from a RowSet variable to the Job Log. This is accomplished by adding a Print task within a For-Each Loop. Follow the steps below to print out the contents of a RowSet variable generated from a Read CSV task:
  1. From within the Project Designer page, expand the Data Translation folder in the Component Library, and then drag the Read CSV task to the Project Outline.
  2. On the Basic tab of the Read CSV task, specify values for the Read CSV Task attributes:
    Input File
    The file path and file name of a single file from which to read the data.
    Output Row
    Set VariableThe name of a variable which will contain the data read from the specified input file.
  3. From within the Project Designer page, expand the Loops folder in the Component Library, and then drag the For-Each Loop task to the Project Outline.
  4. On the Basic tab of the For-Each Loop task, specify the values for the following attributes:
    Items Variable
    Specify the RowSet variable that contains the items to iterate over.
    Current Items Variable
    Specify a variable name which will be populated with the value of the row at the current index.
  5. From within the Project Designer page, expand the Miscellaneous folder in the Component Library, and then drag the Print task to the Project Outline.
  6. On the Basic tab of the Print task, specify the Text value.
    Text
    Using the Current Items Variable, enter the values for the RowSet columns using the Column Index Numbers.
  7. Click the
    Save
    button, and then click the
    Execute Project
    button. The Project will iterate through each Row in the RowSet and print the values from each column to the Job Log.
  8. Once the Project has executed, click the
    View Job Log
    button.
    The Job Log will display the results of the Print task for each row in the RowSet variable (which is highlighted in the page shot below).
    The following image illustrates the Project Outline for the Print task using a Loop:

0 COMMENTS

We’d like to hear from you!