Capitalize the First Letter and Lowercase the Rest of the Text in Okta Workflows

In this guide:

  1. Okta Workflows guides
  2. Capitalize first letter in each word
  3. Related Okta Workflows guides
  4. Okta Workflows resources

Okta Workflows guides

Okta Workflows guides are questions and answers from the community office hours, the #okta-workflows channel on MacAdmins Slack, and other places. Read all the other guides.

How do you capitalize the first letter and lowercase the rest in a text in Okta Workflows?

This guide will teach you how to format a text into a format in which the first letter in a word is capitalized, and the rest is lowercase.

Okta Workflows Allows To Automate Identity Processes

Capitalize first letter in each word

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.

Set the text

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 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).

Upper case the first character

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

Lower case 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.

Okta Workflows resources

🍫 Get help from Workflows specialists during weekly community office hours.

📺 Learn from Workflows videos.

🛟 Ask questions and share your flows on the Okta Workflows community forum.

🙋🏻‍♀️ Get help from the community: join the #okta-workflows channel on MacAdmins Slack.

Leave a comment