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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,952)