web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : L28tUKUjEoOyIyDWuPteQy
Power Automate - Building Flows
Unanswered

Need to Capitalize First Letter of Each Word in power automate--NEED HELP

Like (1) ShareShare
ReportReport
Posted on 12 Jul 2024 04:30:10 by

i want 1st letter in Capital from each word . example i have names like ASHWINI LATA , so i want result like Ashwini Lata. how to do in power automate flow 

  • Chriddle Profile Picture
    7,932 Super User 2025 Season 2 on 12 Jul 2024 at 12:22:03
    Re: Need to Capitalize First Letter of Each Word in power automate--NEED HELP

    If you want to do this with just one expression, the name must not exceed the number of words that this expression can handle (here up to 4 words, but this pattern is easily extendable):

    Chriddle_0-1720786770868.png

    concat(
    	toUpper(
    		substring(
    			outputs('Compose'), 0, 1)
    	),
    	substring(
    		if(
    			less(
    				nthIndexOf(outputs('Compose'), ' ', 1),
    				0
    			),
    			toLower(outputs('Compose')),
    			if(
    				less(
    					nthIndexOf(outputs('Compose'), ' ', 2),
    					0
    				),
    				replace(
    					toLower(outputs('Compose')),
    					substring(
    						toLower(outputs('Compose')),
    						nthIndexOf(toLower(outputs('Compose')), ' ', 1),
    						2
    					),
    					toUpper(
    						substring(
    							toLower(outputs('Compose')),
    							nthIndexOf(toLower(outputs('Compose')), ' ', 1),
    							2
    						)
    					)
    				),
    				if(
    					less(
    						nthIndexOf(outputs('Compose'), ' ', 3),
    						0
    					),
    					replace(
    						replace(
    							toLower(outputs('Compose')),
    							substring(
    								toLower(outputs('Compose')),
    								nthIndexOf(toLower(outputs('Compose')), ' ', 1),
    								2
    							),
    							toUpper(
    								substring(
    									toLower(outputs('Compose')),
    									nthIndexOf(toLower(outputs('Compose')), ' ', 1),
    									2
    								)
    							)
    						),
    						substring(
    							toLower(outputs('Compose')),
    							nthIndexOf(toLower(outputs('Compose')), ' ', 2),
    							2
    						),
    						toUpper(
    							substring(
    								toLower(outputs('Compose')),
    								nthIndexOf(toLower(outputs('Compose')), ' ', 2),
    								2
    							)
    						)
    					),
    					replace(
    						replace(
    							replace(
    								toLower(outputs('Compose')),
    								substring(
    									toLower(outputs('Compose')),
    									nthIndexOf(toLower(outputs('Compose')), ' ', 1),
    									2
    								),
    								toUpper(
    									substring(
    										toLower(outputs('Compose')),
    										nthIndexOf(toLower(outputs('Compose')), ' ', 1),
    										2
    									)
    								)
    							),
    							substring(
    								toLower(outputs('Compose')),
    								nthIndexOf(toLower(outputs('Compose')), ' ', 2),
    								2
    							),
    							toUpper(
    								substring(
    									toLower(outputs('Compose')),
    									nthIndexOf(toLower(outputs('Compose')), ' ', 2),
    									2
    								)
    							)
    						),
    						substring(
    							toLower(outputs('Compose')),
    							nthIndexOf(toLower(outputs('Compose')), ' ', 3),
    							2
    						),
    						toUpper(
    							substring(
    								toLower(outputs('Compose')),
    								nthIndexOf(toLower(outputs('Compose')), ' ', 3),
    								2
    							)
    						)
    					)
    				)
    			)
    		),
    		1
    	)
    )

    Chriddle_1-1720786838020.png

     

     

  • Chriddle Profile Picture
    7,932 Super User 2025 Season 2 on 12 Jul 2024 at 07:21:48
    Re: Need to Capitalize First Letter of Each Word in power automate--NEED HELP

    If your input value is always just the name in uppercase:

    Chriddle_0-1720768741944.png

    Select

    From

     

    split(outputs('Compose'), ' ')

     

    Map

     

    concat(
    	slice(item(), 0, 1),
    	toLower(substring(item(), 1))
    )

     

     

    Compose 2

     

    join(body('Select'), ' ')

     

    Chriddle_1-1720768878102.png

     

  • NathanAlvares24 Profile Picture
    1,673 Moderator on 12 Jul 2024 at 06:52:32
    Re: Need to Capitalize First Letter of Each Word in power automate--NEED HELP

    Hi @Ashwiniy !

     

    You can use this flow for reference.

    Flow:

    NathanAlvares24_0-1720765758199.png

     

    Flow details:

    NathanAlvares24_1-1720766052159.png

    In here, I have kept the name in a variable or it could be coming from Compose action in your case and then I split it by using space so you can get an array. Like this:

    [
     "NATHAN",
     "ALVARES"
    ]

    Expression used:

    split(variables('inputString'), ' ')

     

    Next...

    NathanAlvares24_2-1720766834008.png

    I initialized an array to then store each word. In the apply to each, I used an expression to only take the first letter of each word, capitalize it while making the other letters in lower case and append to that array.

    Expression used:

    concat(toUpper(substring(items('Apply_to_each'), 0, 1)), toLower(substring(items('Apply_to_each'), 1, sub(length(items('Apply_to_each')), 1))))

     

    Lastly...

    NathanAlvares24_3-1720767070168.png

    I used a "Compose" action to finally join the array by using space as its delimiter.

    NathanAlvares24_4-1720767128626.png

    Expression used:

    join(variables('wordsArray'),' ')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete