CSV To List Mapping Step

Last Updated: 08/16/2018 Introduced in Version: 2.0

This tutorial demonstrates how to convert data from Excel Document to a Simple List of Strings using CSV To List Mapping step from Integration > Excel and CSV category in the ToolBox.

 

Example:

We begin in the Designer Folder with clicking Create Flow button on the Folder Actions panel.

Figure 1: Lower Panel Action Bar

 

Next, we Name the Flow and click Create to proceed to the Flow Designer.

Figure 2: Name Flow

 

In the Flow Designer we add Create Data step from All Steps [Catalog] > Data category in the Flow Designer Wizard.

Figure 3: Quick Add Step Dialog

 

In the resulting Edit Step pop-up window select Add New link to create new Data.

In the Add Data Definitions window Name our Data Definition and define its Type as FileData.

Our Data Definitions should look like following. Select Close to save and close.

Figure 4: Define Data

 

Then, we add CSV To List Mapping step from All Steps [Catalog] > Integration > Excel and CSV category in the Flow Designer Wizard.

Figure 5: Quick Add Step Dialog

 

Next, we are going to pick an Excel Document for our Flow. The Excel Document for this example looks as follows:

2016-12-14_083538

Figure 6: Example Excel

 

To add this Excel Document to our Flow we select Create Data step on the work space. Within the Edit Step dialog locate the Inputs section, and select the Excel Document using Choose File for our File Data Definition.

Figure 7: Upload Example Excel File

 

Next, select CSV To List Mapping step on the work space. Within the Edit Step dialog define its Output Type as String.

Figure 7: Output Type for CSV to List Mapping

 

In the Inputs section for the CSV To List Mapping step we choose Select Value from the Mapping type dropdown for InputFile.

Then, use Path picker to map InputFile to the File Data Definition from Create or Copy Data Step.

Figure 8: Input File for CSV to List Mapping

 

Next, select Show Item Mapping Editor option from CSV To List Mapping step’s Properties Toolbox.

Figure 9: Show Item Mapping Editor

 

In the Item Mapping Editor  use Merge Plain Text mapping type for the ITEM field.

Then select Show Editor button to create Merged Text.

Our completed Text Merge should look as following for this example… When finished, close Text Merge Editor. Then, save and close Item Mapping Editor.

Figure 10: Merge Text Editor

 

Back in the Flow Designer we need to create a Form to display data from CSV To List Mapping step. We add Show Form step from Favorite Steps in the Flow Designer Wizard.

Figure 11: Show Form

 

In the resulting dialog Name our Form and click Create to proceed to the Form Designer.

Figure 12: Create New Form

 

In the Form Designer, add Button control component from Actions category in the ToolBox for our Form to have at least one Outcome.

Then, add List Box component from Data category in the ToolBox.

Configure our List Box component as following. Define List Items Data Name and Type of String in the Input Data section. This completes our Form Design. Save our Form and close Form Designer.

Figure 13: List Box Input/Output Data

 

Back in the Flow Designer we connect our Form step to the End Step on the workspace. Then, we call Mapping Editor for our Form step to map Simple List component to the data it should display.

Figure 14: Edit Input Mapping

 

In the Mapping Editor, connect the List component to the OUTPUTS outcome from CSV To List Mapping step. Then, Ignore the Mapping type for the Selected Item in the List field. Select Ok to save and close Mapping Editor.

Figure 15: Input Mapping: Show Form

 

Connect the Show Form Step to the End Step, the flow is complete. Select Debug from the Top Panel in the Flow Designer to test the Flow.

Figure 16: Debug

 

The Display Form opens in the Debugger. Observe that the List component displays Data from the Excel Document as it was designed in CSV To List Mapping step. Select the Button on our Form in the Debugger to close the Form.

Figure 17: Show Form in Debugger

 

Flow Diagram Tab in the Debugger indicates that our Flow ran to the End Step with no errors.

Figure 18: Complete Flow

 

Additional Resources