- 24 Oct 2022
- 2 Minutes to read
- Print
- DarkLight
CSV To List Mapping Step
- Updated on 24 Oct 2022
- 2 Minutes to read
- Print
- DarkLight
Overview
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 Steps panel.
Example
Begin in a Designer Folder by selecting the 'Create Flow' button on the Folder Actions panel.
Next, name the Flow and select 'Create' to proceed to the Flow Designer.
In the Flow Designer, add a Create Data step from All Steps [Catalog] > Data category in the Steps panel.
In the Edit step dialog select 'Add New' link to create new Data.
In the Data Definitions window name the Data Definition and define its Type as FileData. Select 'Close' to save and close.
Then, add a CSV To List Mapping step from All Steps [Catalog] > Integration > Excel and CSV category.
Next, pick an Excel Document for the Flow. The Excel Document for this example looks as follows:
To add this Excel Document to the Flow select the Create Data step on the workspace. Within the Edit Step dialog locate the Inputs section, and select the Excel Document using Choose File for the File Data Definition.
Next, select CSV To List Mapping step on the workspace. Within the Edit Step dialog define its Output Type as String.
In the Inputs section for the CSV To List Mapping step, choose Select Value from the mapping type dropdown for InputFile.
Then, use the Pick Data dialog to map Input File to the File Data Definition from Create Data step.
Next, select Show Item Mapping Editor option from CSV To List Mapping step’s Properties panel.
In the Item Mapping Editor use the Merge Plain Text mapping type for the ITEM field. Then select 'Show Editor' to create Merged Text.
The completed Text Merge should look as following for this example… When finished, select 'Save' to close the Merge Text Editor. Then, save and close the Item Mapping Editor.
Back in the Flow Designer, create a Form to display data from CSV To List Mapping step. Add the Show Form step from the Favorite Steps category.
In the resulting dialog name the Form and select 'Create' to proceed to the Form Designer.
In the Form Designer, add the Button control component from Actions category in the ToolBox for the Form to have at least one Outcome. Then, add the List Box component from the Data category in the ToolBox. Configure the List Box component as follows. Define List Items Data Name and Type of String in the Input Data section. Save the Form and close Form Designer.
Back in the Flow Designer, connect the Show Form step to the End step on the workspace. Then, select Edit Input Mappings for the Show Form step to map the 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 the 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 the Form in the Debugger to close the Form.
Flow Diagram Tab in the Debugger indicates that the Flow ran to the End step with no errors.