Formatting Objects With Format Text Step
- 27 Jul 2021
- 1 Minute to read
- Print
- DarkLight
This documentation version is deprecated, please click here for the latest version.
Formatting Objects With Format Text Step
- Updated on 27 Jul 2021
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Utilizing the Format Text step (located under Steps > Data > Text) allows users to format an Object in Decisions using .NET String.Format methodology. String.Format allows the ability to convert Object values into Strings via the provided Format String.
Addition Information on String.Format
The following document implements a basic String.Format String. For more information on how to use String.Format see Microsoft: String.Format Method.
The following document demonstrates how to use a Format Text step to insert a numerical value into a Format String.
Example
- From Decisions Studio, select the CREATE FLOW button on the Global Action Bar. Then, CREATE a new Flow.
- From the Flow Designer, from Steps > Favorite Steps, attach a Create Data step to the Start step.
- From the Create Data step's Properties tab, select Show Editor.
- Provide a Name (for this example "YearValue") for the Data, then select Int32 [Number] from the Type drop-down, and define the Input as "2021". CLOSE out of the Data Definitions window.
- Back in the Flow Designer, under Steps > Data > Text, attach a Format Text step to the Done path of the Create Data. Then connect the Format Text step's Done path to the End step.
From the Properties tab of the Format Text step, Select From Flow map YearValue to Input.
More on InputThe Input Object represents the Object that will be converted via the Format String Input.Still in the Properties of the Format Text step, Constant map the desired Format String.
Format String ConfigurationInput the following under Format String "The current year is .; "Save the Flow, then if desired, Close the Flow Designer.
Debug
- From the Flow Designer, click the Debug link on the top Action Bar, then click FULL.
- After the Flow runs, select Format Text 1 > Execution 1 > View Output Data.About Debug ResultsThe resulting Output Data will display in the form of the Format String with the period character being replaced by define Input.
Was this article helpful?