Formatting Objects With Format Text Step
  • 27 Jul 2021
  • 1 Minute to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Formatting Objects With Format Text Step

  • Dark
    Light

Article summary

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 

  1. From Decisions Studio, select the CREATE FLOW button on the Global Action Bar. Then, CREATE a new Flow
  2. From the Flow Designer, from Steps > Favorite Steps, attach a Create Data step to the Start step. 
  3. From the Create Data step's Properties tab, select Show Editor.
  4. 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. 
  5. 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. 
  6. From the Properties tab of the Format Text step, Select From Flow map YearValue to Input

    More on Input 
    The Input Object represents the Object that will be converted via the Format String Input


  7. Still in the Properties of the Format Text step, Constant map the desired Format String

    Format String Configuration 
    Input the following under Format String "The current year is .; "


  8. Save the Flow, then if desired, Close the Flow Designer.



Debug 

  1. From the Flow Designer, click the Debug link on the top Action Bar, then click FULL. 
  2. After the Flow runs, select Format Text 1 > Execution 1 > View Output Data.
    About Debug Results
    The 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?