- 02 Nov 2020
- 2 Minutes to read
- Print
- DarkLight
Calling a .NET Library Function From a Flow
- Updated on 02 Nov 2020
- 2 Minutes to read
- Print
- DarkLight
Overview
The .NET Library contains a wide range of common functions, classes, and methods that can expedite the development process. To call a .NET Library function from a Flow go to the Flow Designer and expand the category Integration > .NET Libraries, and drag a component to the workspace.
Example
In this example, create a Flow that calls the Copy method to copy the text entered in a Form's text box. This is what is referred to later as a Basic Form. This Form's main components are a Text box and an Action button. This text will display in another Form. This Form will be referred to as an EndForm. This Form contains a Label.
The two Forms created for this example were a Basic Form and an EndForm. Navigate to a Designer Folder and click the Create Flow button. Give the Flow a Name and click CREATE to open it in the Flow Designer.
Start building the Flow by adding the Form that will capture the text that will be copied. Add a Show Form step; then, from the step's Properties tab, select the Pick or Create Form button. Name the Form, "Basic Form" and select CREATE.
Format the Form with a Button, Label and Textbox. Save and Close the Form Designer.
Back in the Flow Designer add the method that will copy the text. In the Tool Box, expand the category Integration > .NET Libraries > System > String (Class) and drag a System.String Copy(System.String) (Method) component into the workspace.
Finally, add the Form that will display the copied text. Expand the category Flows, Rules, Forms and Reports > Forms [End] > [Pick or Create End Form], and select the Pick or Create EndForm button. Name the Form and select CREATE. Format the Form with the Label of Data Value from Data> Copy 1_Output. Save and Close the Form Designer.
Connect the Start step to the Basic Form step. This is the first form that opens when the Flow runs. Connect the Basic Form step to the Copy step which is used to copy the text. Connect the Copy step to the EndForm step that will then display the copied text. Since all of the Flow steps are connected, connect the EndForm step to the End step. Now that the paths are connected, configure two of the components.
Navigate to the Properties tab for the System.String Copy(System.String) (Method) step and select the Edit Input Mapping link.
In the Mapping Editor, connect the Form output, the text collected in the Basic Form, to the STR input and click OK .
Next, from the Properties tab of the Basic Form, under Inputs, set the Mapping for the Textbox to Ignore; this will enable the ability to input custom text that will be copied by the Copy step.
This completes the Flow, Save and Close the Flow.
Debug
In the Flow Designer click the Debug link to run the Debugger.
Enter text in the Textbox of the Basic Form, and click Ok.
After the Flow completes, the copied text will display on the EndForm. This demonstrates how a Flow can utilize .NET Library functionality to help expedite development.