CSV To List Mapping StepLast 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.
We begin in the Designer Folder with clicking Create Flow button on the Folder Actions panel.
Next, we Name the Flow and click Create to proceed to the Flow Designer.
In the Flow Designer we add Create Data step from All Steps [Catalog] > Data category in the Flow Designer Wizard.
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.
Then, we add CSV To List Mapping step from All Steps [Catalog] > Integration > Excel and CSV category in the Flow Designer Wizard.
Next, we are going to pick an Excel Document for our Flow. The Excel Document for this example looks as follows:
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.
Next, select CSV To List Mapping step on the work space. Within the Edit Step dialog define its Output Type as String.
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.
Next, select Show Item Mapping Editor option from CSV To List Mapping step’s Properties Toolbox.
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.
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.
In the resulting dialog Name our Form and click Create to proceed to the Form Designer.
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.
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.
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.
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.
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.
Flow Diagram Tab in the Debugger indicates that our Flow ran to the End Step with no errors.