Hello
I'm trying to make the first letter a capital and the remaining lowercase. The example first and last names are a mixture of upper and lower case. I can make the first letter a capital using the concat below but i'm unsure on how to apply to the second word.
Solved! Go to Solution.
Hi @DanSessions ,
If your word would always be split by the space, you could refer to screenshot below to create the flow:
The expression in the Compose 2 as below:
split(toLower(outputs('Compose')),' ')
The expression in the append to array variable as below:
concat(toUpper(substring(items('Apply_to_each'),0,1)),substring(items('Apply_to_each'),1,sub(length(items('Apply_to_each')),1)))
The expression in the join action as below:
string(' ')
The flow would run successfully as below:
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi!
You can use split() function and space delimiter to store all the words as differnt element of an array. Then iterate throught all array elemnts by means of'Select' action block and manipulate all of them with your current formula, so your output array will have all words with first letter capitalized. Finally you can convert your output array back into a string by means of join() function
Hope this helps
Proud to be a Flownaut!
Please see my example below. I could have made this shorter but I spilt it out into multiple compose actions for clarity. In addition, I convert the first letter to uppercase but I didn't convert the rest to lower case - that would be easy to do using toLower() inside of the concat() action.
Hi @DanSessions ,
If your word would always be split by the space, you could refer to screenshot below to create the flow:
The expression in the Compose 2 as below:
split(toLower(outputs('Compose')),' ')
The expression in the append to array variable as below:
concat(toUpper(substring(items('Apply_to_each'),0,1)),substring(items('Apply_to_each'),1,sub(length(items('Apply_to_each')),1)))
The expression in the join action as below:
string(' ')
The flow would run successfully as below:
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @DanSessions ,
Have your problem been solved?
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It is mind boggling that Microsoft doesn't have a simple expression like they have in Excel to Capitalize the first letter of a word.... Very disappointed with the overall speed of development of power automate, so many lacking features (version history, empty array, etc...)
Join digitally, March 2โ4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
86 | |
59 | |
50 | |
42 | |
37 |
User | Count |
---|---|
91 | |
76 | |
74 | |
61 | |
43 |