- 30 Dec 2021
- 2 Minutes to read
- Print
- DarkLight
String Builder Steps Overview
- Updated on 30 Dec 2021
- 2 Minutes to read
- Print
- DarkLight
Overview
There are a collection of Flow steps that are used to create or manipulate strings. These steps can be used on plain text strings or HTML text strings for file creation by building and looping through strings. These also preserve memory for processes that use heavy string manipulation.
Summary of String Builder Steps
Step Name | Step Function |
Create String Builder | Creates the string builder entity and outputs that entity variable |
Append Text | Adds a user declared string to the string builder entity variable |
Append Blank Lines | Adds an amount of blank lines to the string builder entity based on a user declared number |
Append Line | Adds a user declared string on a new line to the string builder entity variable |
Append Text List | Takes in a list strings and creates html line items utilizing the "<li>" tags, and adds it to the string builder entity variable |
Append HTMLLine With Tags | Adds a declared user string along with a user declared html tag and adds it to the string builder entity variable |
Append HTMLText | Adds user declared HTML Text to the string builder entity variable |
Append HTMLLines | Adds an amount of HTML break lines to the string builder entity based on a user declared number |
Append Image | Adds a user specified file to the string builder entity |
Close String Builder | Closes the active String Builder Entity that was created. This step ensures that all appended lines of the String have been written to the File. |
To Text | Outputs and converts the String Builder Entity into plain text |
ToHTMLText | Outputs and converts the String Builder Entity into HTML text |
Example
In this example, a Flow was created that contained the following steps:
- Create String builder
- Append Text
- Append Blank Lines
- Append Line
- Close String Builder
- To text
On the 'Append Text' step, map the output from the 'Create String Builder' into the 'Append Text' input. Then type some string data into the 'Text To Add' input variable.
On the 'Append Blank Lines' declare the integer 3 on the 'line Count' and map the 'CreateStringBuilder1_Output' into the 'String Builder' input variable.
On the 'Append Line' step, map the 'CreateStringBuilder1_Output' and declare a constant string.
On the 'Close String Builder', merely map the 'CreateStringBuilder1_Output'.
It is best practice to attach a Close String Builder step at the end of any Flow that utilizes String Builder steps.
On the 'To Text' step map the 'CreateStringBuilder1_Output' into the 'To Text' 'String Builder' input and Debug the Flow.
After this final configuration, Debug the Flow and view the output of the 'To Text1' Step. The following output should be displayed.