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
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (81,940)