- 12 Mar 2021
- 2 Minutes to read
- Print
- DarkLight
Capitalize Letters Via Data Flow
- Updated on 12 Mar 2021
- 2 Minutes to read
- Print
- DarkLight
Overview
Example Lab Details | |
Version | 6.10.2 |
Root Folder | Example Lab-Capitalize Letters Via Data Flow |
Modules | None |
Dependencies | None |
This Example Project demonstrates how to capitalize text on a Form using a Data Flow.
Explanation
This example contains a Form, Data Flow, and a Main Flow to run the Form. The Form has a Text box field that allows the user to enter a string. In the Form Designer there is a Data Flow that will take the entered string and capitalize it. The input to the Data Flow is the text from the Main Form. The Create Data step holds a string list. This list will be used later in the Flow. The Get String Length step takes in the text input and outputs the length of the text. The For Loop step takes in the Get String Length step output and outputs an Item of int 32 type. This step is used to go through the capitalization process for each letter in the text. The Split String By Character Positions step will take in the Text input and is set to a constant of 1 for the position input. This step takes in the string and pulls the first character of that string. Capitalize step takes in the output of the Split String By Character Positions step and capitalizes that character. The Add Item to List step is used to place the output character of the Capitalize step to the string list that is contained in the Create Data Step at the beginning of the Flow. The Remove Chars From Start step removes the position 1 character from the Text input. As each character is capitalized it is removed from the input string. The last step is the converter Flow, Merge String List To Single String, that takes in the updated string list from the Create Data step and converts it to a single string.
Back in the Main Form, the data Flow is configured to be triggered when the user exists the text box field on the Main Form.
Run the Main Flow and enter a text and click-off of the text box to see the Data Flow capitalize the value.