Skip to main content

Notifications

Community site session details

Community site session details

Session Id : JE9+qkqnzj/C62IPN+dT3C
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,669 Super User 2025 Season 1 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,669 Super User 2025 Season 1 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 Super User 2025 Season 1 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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started