CSV To List Mapping StepLast Updated: 07/15/2016 Introduced in Verision: 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 Data > List > 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 Or Copy Data step from All Steps [Catalog] > Data category in the Flow Designer Wizard.
In the resulting Data Definitions pop-up window we click Add New link to create new Data.
In the Add Data Definitions window we Name our Data Definition and define its Type as FileData. When finished, we save and close this window.
Our Data Definitions should look like following. We click Add to continue.
Then, we add CSV To List Mapping step from All Steps [Catalog] > Data > List > 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 or Copy Data step on the workspace. Then, using Step Information Layer we locate Inputs section, and select the Excel Document using Value picker for our File Data Definition.
Next, we select CSV To List Mapping step on the workspace, and using Step Information Layer we 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, we use Path picker to map InputFile to the File Data Definition from Create or Copy Data Step.
Next, we select Show Item Mapping Editor option from CSV To List Mapping step’s Options Menu.
In the Item Mapping Editor we use TextMerge.Plain mapping type for the ITEM field.
Then we click Show Editor button to create Merged Text.
In the Text Merge Editor we expand INPUT category. We can use TextValue from Field01 as a value for the First Name in this example.
Our completed Text Merge should look as following for this example… When finished, we close Text Merge Editor. Then, we 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 pop-up window we Name our Form and click Create to proceed to the Form Designer.
In the Form Designer we add Button control component from Actions category in the ToolBox for our Form to have at least one Outcome. Then, we add Simple List component from List category in the ToolBox.
We configure our Simple List component as following… We define List Items Data Name and Type of String in the Input Data section. Then, we provide this component with Selected Item(s) Data Name and Outcome Scenarios. This completes our Form Design. We can 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 we connect our List component to the OUTPUTS outcome from CSV To List Mapping step. Then, we can Ignore Mapping type for the Selected Item in the List field. We click Ok to save and close Mapping Editor.
Our Flow is completed now. We click Debug Flow link from the Top Panel in the Flow Designer to test our Flow.
Note that in Decisions version 3.5 and above, you’ll need to click Test Flow to access the Debugger.
Our Display Form opens in the Debugger… We can observe that the List component displays Data from the Excel Document as we designed it in CSV To List Mapping step. We can click Done 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.