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.
Solved! Go to Solution.
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.
Proud to be a Flownaut!
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.
Proud to be a Flownaut!
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.
Proud to be a Flownaut!
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,
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!
Proud to be a Flownaut!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
User | Count |
---|---|
25 | |
25 | |
25 | |
21 | |
15 |
User | Count |
---|---|
51 | |
45 | |
35 | |
31 | |
30 |