<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Capitalize the First Letter in Each Word and Lowercase the Rest of the Text in Workflows
Workflows
Okta Classic Engine
Okta Identity Engine

Overview

This article will show how to format text so that the first letter of each word is capitalized and the rest is lowercase.

Okta Workflows Allows To Automate Identity Processes

Solution

The flow will convert the text:

OKTA WORKFLOWS allows to automate identity processes!

to

Okta Workflows Allows To Automate Identity Processes!

The solution has two flows.

 

The first flow sets the text to format. The second flow formats each word.

 

Text to format

This is the first flow.

 


Set text to format.

The flow has the following steps.

 

Set the text

 

The Text - Compose card sets the text to format.

 

Split the text

 

The List - Split card splits the text into a list. Each word from the text becomes a list item.

[
  "OKTA",
  "WORKFLOWS",
  "allows",
  "to",
  "automate",
  "identity",
  "processes!"
]

Format each word

 

The List—Map card uses a helper flow to format each word from the list. The card returns a new list with all the words in the correct format.

List to text

 

The List – List to Text card converts the list of text items back to regular text.

 

Format a word

 

The helper flow formats each word from the list.

 


Format each word.

The flow was the following steps.

 

Input

 

The main flow passes each word from the list to the helper flow.

 

Get the first character

 

The Text – At card gets a word's first letter (character).

 

Uppercase the first character

 

The Text – To Upper Case upper cases the first letter (character).

 

Lowercase the rest of the text

 

The Text – To Lower Case formats the entire word to lower case.

 

Substring

 

The Text – Text Segment card returns a string minus the first letter (character).

 

Combine

 

The Text – Concatenate card combines the first letter in upper case with the rest in lower case text.

 

Result

 

The Return card returns the word in the correct format to the main flow.

 

Running the flow

 

Running the flow.

 


Formatting a text.

The input

OKTA WORKFLOWS allows to automate identity processes!

will format to

Okta Workflows Allows To Automate Identity Processes!

 

Get the Flows

Download the flows.

 

Related References

 

 

Recommended content

Loading
Capitalize the First Letter in Each Word and Lowercase the Rest of the Text in Workflows