cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Extracting Portion of Subject String Only - Help

Hi all,

I will first state what I have working and then ask how I can replicate this in a similar flow. The only difference is instead of extracting the last item in a Subject, I would like to extract a value that will be in the middle of a Subject String.

 

Working Flow:

When I receive an email the subject is: Your Workgroup has been assigned Incident: (Incident Number)

Jspeer1_0-1599159612015.png

 

 

Items are as follows:

Compose: split(triggerBody()?['Subject'],'incident')

Set Variable: outputs('Compose')?[1]

This works to always grab the Incident Number that will always be after the ":" in the subject
Output example:

Jspeer1_1-1599159748356.png


Help I need:

I have another flow which I would like to do the exact same steps on but this time only grab a portion of that Subject and then Output it.

Example Subject: Catalog Task SCTASK0030103 has been assigned to group

 

How can I configure my variables so it only extracts the number betweeen "Task" and "has". I need the output to always just only grab that value that will be between those 2 words. I have highlighted what I would like it to extract and transfer to a Output.

 

if it helps this then goes out to an Excel sheet and add's a row containing Date and Time and then Ticket Number which would be where I need the output to go out to and paste that value in there.

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions

@abm 

EDIT, never mind I got it with 

first(split(last(split(triggerBody()?['Subject'],'Task ')),'has'))
 
Thanks!

 

View solution in original post

4 REPLIES 4
Super User III
Super User III

Hi @Jspeer1 

 

Here it is

 

image.png

 

Above I have used the below expression

 

first(split(last(split(outputs('Compose'),'Task ')),'has'))

 

My test result

 

image.png

 

Thanks

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

@abm I'm just about to test it but would that output still need to be called upon using outputs('Compose')?[1]

 

I'd like to use that output on an excel row so just making sure the output will still display if I use outputs('Compose')?[1]  to reference it.

 

Thanks,

@abm 

EDIT, never mind I got it with 

first(split(last(split(triggerBody()?['Subject'],'Task ')),'has'))
 
Thanks!

 

View solution in original post

Hi @Jspeer1 

 

That's exactly I suggested in my previous post.

 

If your problem has solved, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (11,224)