cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MikeRooker
Helper V
Helper V

Is there a way to make a Display Name in "send an email" action that is all in lowercase into Camel Case?

Hey guys,

 

I have a "send an email" action where I pull in dynamic content for "Username Display Name" however it keeps coming up as lowercase. Is there an expression or variable conversion that can make the Display Name rendered in Camel Case?

i.e. clark kent

should be Clark Kent

 

Thank you in advance for any help.

1 ACCEPTED SOLUTION

Accepted Solutions

hi @MikeRooker  I made a dynamics solution for 2 words

concat(toUpper(substring(outputs('Compose'),0,1)),substring(outputs('Compose'),1,indexOf(outputs('Compose'),' ')),toUpper(substring(outputs('Compose'),add(indexOf(outputs('Compose'),' '),1),1)),substring(outputs('Compose'),add(indexOf(outputs('Compose'),' '),2),sub(length(outputs('Compose')),add(indexOf(outputs('Compose'),' '),2))))

 

Just replace compose for your output, or test with a compose action.

 

 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

7 REPLIES 7
ChristianAbata
Community Champion
Community Champion

Hi @MikeRooker  it looks like you need this

 

https://powerusers.microsoft.com/t5/Building-Flows/Split-CamelCase-String/td-p/356221

 

Hope this can help.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Whoa that's huge code. lol And this will take something like "clark kent" and make it "Clark Kent"? Will that code like use a lot more resources? LOL

hi @MikeRooker  I made a dynamics solution for 2 words

concat(toUpper(substring(outputs('Compose'),0,1)),substring(outputs('Compose'),1,indexOf(outputs('Compose'),' ')),toUpper(substring(outputs('Compose'),add(indexOf(outputs('Compose'),' '),1),1)),substring(outputs('Compose'),add(indexOf(outputs('Compose'),' '),2),sub(length(outputs('Compose')),add(indexOf(outputs('Compose'),' '),2))))

 

Just replace compose for your output, or test with a compose action.

 

 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

 

Hi @MikeRooker ,

 

Please try to refer to the method provided by @ChristianAbata to achieve your needs.

Power Automate does not make any changes to the User Display Name. It has already lowercased the first letter when it was defined. Power Automate only outputs the defined values.

So we can only use WDL function to try to change the first letter to meet your needs.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That's intense man.

How do you use it please?

Hi!

I guess there is another approach, with its pros (valid no matter the number of words) and cons (not a compact expression, since needs a loop to iterate, execution slower also).

So, assuming words are separated by single space, and you already have stored your original Display Name in a variable called 'myInputDisplayName', you need to Initialize variable, name 'myOutputDisplayName', type string, leave value empty

Now, add an 'Apply to Each', assign as its input the following expression

 

 

split(variables('myInputDisplayName'),' ')

 

 

Next, inside the Apply to Each, add an 'Append to String' action block, name 'myOutPutDisplayName', assign as its value the following expression:

 

 

concat(toUpper(first(item())),skip(item(),1))

 

 

Now, outside the Apply to each, just add a dummy Compose action block and assign as its value the variable 'myOutputDisplayName' to inspect result

 

Take care and keep healthy!

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



That is awesome @efialttes ! Thank you!

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,165)