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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need to Capitalize Fir...
Power Automate
Unanswered

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

(1) ShareShare
ReportReport
Posted on 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 

Categories:
I have the same question (0)
  • NathanAlvares24 Profile Picture
    1,714 Moderator on at

    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'),' ')
  • Chriddle Profile Picture
    8,441 Super User 2025 Season 2 on at

    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

     

  • Chriddle Profile Picture
    8,441 Super User 2025 Season 2 on at

    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

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard