cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
crmart1n_mx
Frequent Visitor

Variable to format name from O365 profile into initials

I'm looking to build out a rather simple flow that will take certain information from a MS form and output it as an email sent from a shared mailbox.

 

My question however, is that for the email signature of the outgoing email, I'd like it to be in the format of "First Name/First Initial Last Initial" - example, "Chris/CM"

 

Is there a way to perhaps build a variable or something that if I were to extract their name using the Office 365 Get user profile function?

 

Thank you so much in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @crmart1n_mx ,

 

Maybe you could try the following expression:

concat(first(split(outputs('Get_user_profile_(V2)')?['body/displayName'],' ')),'/',substring(first(split(outputs('Get_user_profile_(V2)')?['body/displayName'],' ')),0,1),substring(last(split(outputs('Get_user_profile_(V2)')?['body/displayName'],' ')),0,1))

I have made a test for your reference.

vyujincuimsft_0-1652945539250.png

Result Screenshots:

vyujincuimsft_1-1652945604073.png

vyujincuimsft_2-1652945677994.png

 

 

Best Regards,
Charlie Choi

View solution in original post

2 REPLIES 2
v-yujincui-msft
Community Support
Community Support

Hi @crmart1n_mx ,

 

Maybe you could try the following expression:

concat(first(split(outputs('Get_user_profile_(V2)')?['body/displayName'],' ')),'/',substring(first(split(outputs('Get_user_profile_(V2)')?['body/displayName'],' ')),0,1),substring(last(split(outputs('Get_user_profile_(V2)')?['body/displayName'],' ')),0,1))

I have made a test for your reference.

vyujincuimsft_0-1652945539250.png

Result Screenshots:

vyujincuimsft_1-1652945604073.png

vyujincuimsft_2-1652945677994.png

 

 

Best Regards,
Charlie Choi

crmart1n_mx
Frequent Visitor

This is brilliant and worked perfectly. It's much appreciated.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,775)