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
Community Champion
Community Champion

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

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,134)