cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JPLpara
Regular Visitor

extract text from subject line

Hi All

 

I've got the below flow running which is working well, However i'm looking to get the title of the task as only the first part (name) of the subject line and not the whole line.

 

every subject is in the format of name, personal ID number, then more text i.e "Joe Bloggs 12345678 (Reading ) HAS REPORTED FIT. (NO REPLY)"  How do I only get the first part which is the name? 

 

Many thanks

JPL

 

flow.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

I just gave an example with a hardcoded value. replace that with your Subject property from outlook.

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

3 REPLIES 3
PrasadAthalye
Super User
Super User

If the subject always will have the first name followed by the last name, you can use Split Function to split the string into an array based on the space and then concatenate the first and 2nd index...

 

PrasadAthalye_0-1613321341464.png

First variable expression --> 

split('Joe Bloggs 12345678 (Reading ) HAS REPORTED FIT. (NO REPLY)'' ')
 
Second Variable Expression --> 
concat(variables('EmpNameArray')[0], ' ', variables('EmpNameArray')[1])
 
 
PrasadAthalye_2-1613321520367.png

 

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
JPLpara
Regular Visitor

Probably should have mentioned each e-mail has a different staff member, this array appears to just input the name joe bloggs regardless of the name in the e-mail subject? 

I just gave an example with a hardcoded value. replace that with your Subject property from outlook.

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (1,747)