Using Run Flow For CSV Step
  • Updated on 29 Dec 2014
  • 3 minutes to read
  • Print
  • Dark
    Light

Using Run Flow For CSV Step

  • Print
  • Dark
    Light

This tutorial shows how to use Run Flow For CSV step. This step can be found in Data > List > Excel and CSV category in the ToolBox .

Example:
In this Example we will use Run Flow For CSV step to replace a Row in theExcel Document using this subflow Step .
We begin in the Designer Folder with clicking Create Flow on the Folder Actions panel.
2018-07-10_090324-11.jpg

Next, we Name the Flow and click Create to proceed to the Flow Designer.
2018-07-12_114623.jpg

In the Flow Designer we add Create Data step from All Steps [Catalog] > Data category in the Flow Designer Wizard.
2018-07-12_114947.jpg

In the resulting Data Definitions pop-up window we click Add New link to add new data definition for this step.
2016-12-13_132441.png

Then, we Name our Data Definition and pick FileData type for it, using Type selector.
2018-07-12_115144.jpg

Next, we add Run Flow For CSV step from All Steps [Catalog] > Integration > Excel and CSV category in the Flow Designer Wizard.
2018-07-12_115406.jpg

Then, we add aForm from the Flows, Rules, Forms and Reports > Forms[Interaction] > [Pick or Create Form] .
2018-07-12_115456.jpg

This form has two controls on it:

  • FirstButton control from Actions category for Form to have at least one Outcome .
  • SecondFile Download control from File Handling category for user to be able to download edited Excel Document .

2018-07-12_115908-1.jpg

Now, we can pick our Excel Document for the Create or Copy Data step. The Excel Document we are going to use in this Example looks like following:
2016-12-13_151341.png

First, we selectCreate Data step on the workspace. Then, we navigate to its Properties . Next, we locate Inputs section and using Choose File we select our Excel File.
2018-07-13_103516.jpg

Then, we select Run Flow For CSV step on the workspace and configure its Properties as follows.
2018-07-13_104530-1.jpg

In the Current Designer Folder, find the associated Flow for CSV.  The flow is automatically generated and sits in your Current Designer Folder, renamed with an underscore (e.g. main flow: FlowName, sub flow: FlowName_ ).  Open this flow.
2018-07-13_104957.jpg

The Flow Designer window opens.
First, we add Replace Row step from All Steps [Catalog] > Integration > Excel and CSV category in the Flow Designer Wizard.
2018-07-13_105157.jpg

Next, we connect Replace Row step to the End Step . Call Mapping Editor for the Replace Row step from its Action Menu .
2018-07-13_105258.jpg

In theMapping Editor we use RowData input to this Sub Flow for defining file Type as FileType (CSVFileType) and input as FileData (FileData) fields. Next, we define Constant value for new Row . In this example we want to replace the first Row in our Excel Document . We define row Number as 0 . We click Ok to save and close Mapping Editor.

2018-07-13_105530.jpg

Back in the Flow Designer we select End Step on the workspace. Using Step Information Layer we map Data for the predefined OutputData variable. We select Mapping type as Select Value, and using Path picker we pick the outcome data from Replace Row step. And this completes our Sub Flow . We can save it and close this Flow Designer.
2018-07-13_105656.jpg

Back in theMain Flow Designer we select our Form Step and choose Show Mapping Editor option for this Step .
2018-07-13_105859.jpg

In the Mapping Editor we are using First file from the ResultList (the outcome from Run Flow For CSV step ) as an input for our DownloadFile control. Then, we save and close Mapping Editor.
2018-07-13_110050.jpg

Back in the Flow Designer we connect all steps in our Flow as following… This, completes our Flow . We click Debug Flow link on the Top panel of the Flow Designer to test our Flow .
2018-07-13_110153.jpg

Our Download File Form opens in the Debugger and we click Download File control.
2016-12-13_194451.png

Then, we Name our updated File and Save it.
2016-12-13_194725.png

We click Done control on the Form to close it.
2016-12-13_194825.png

Diagram Tab in the Debugger indicates that our Flow executed successfully with no errors.

2016-12-13_194932.png

When we locate and open our Updated Excel Document, we can observe that first row was replaced for the value we have provided in the sub Flow .
2016-12-13_195042.png

Was this article helpful?