cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

I want to return specific data within a subject line into an existing list

Hello -- I've created the beginning of the flow: the email populates into a folder in my inbox, and I've began on the next step. 

This is what I have so far:

 

When a new email arrives

Inbox

To

From

etc..

 

Create Item 

Site: Sharepoint site

List name

List item 1. substring(triggerBody()?['Subject'], 5, 4)

  • which works^ - it returns the value I needed.

List item 2. 

  • I need to return the last element of the subject line but not sure how

 

Example Subject Line:

ABC: Jane D--3F (Frank)

 

I have successfully extracted information from list item 1. with the formula above.

 

What formula would I use to return (Frank) without paranthesis?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: I want to return specific data within a subject line into an existing list

Hi @ mariexela,

 

Could you please share a screenshot of the configuration of your flow?

Do you want to get the "(Frank)" in the subject line "ABC: Jane D--3F (Frank)"?

 

Please take a try to create a flow as below:

Capture.PNG

 

The expression in the Compose as below:

first(skip(split(triggerBody()?['Subject'],' '),3))
 
The flow would run successfully as below:
Capture.PNG

 

 

 

Regards,
Alice Zhang

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: I want to return specific data within a subject line into an existing list

Here is one way to go about this.  I could have collapsed this into one action but I separated it into a number of variables for clarity.

 

String2.jpg

 

Formula for Find start of String: 

add(lastIndexOf(triggerBody()?['Subject'],'('),1)
 
Formula for Find End of String:
lastIndexOf(triggerBody()?['Subject'],')')
 
Formula for String Length:
sub(variables('EndString'),variables('StartString'))
 
Formula for Title column:
substring(triggerBody()?['Subject'],variables('StartString'),variables('StringLen'))
 
All variables are integers
 
Please let me know if this solves your issue.
 
Scott
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Community Support
Community Support

Re: I want to return specific data within a subject line into an existing list

Hi @ mariexela,

 

Could you please share a screenshot of the configuration of your flow?

Do you want to get the "(Frank)" in the subject line "ABC: Jane D--3F (Frank)"?

 

Please take a try to create a flow as below:

Capture.PNG

 

The expression in the Compose as below:

first(skip(split(triggerBody()?['Subject'],' '),3))
 
The flow would run successfully as below:
Capture.PNG

 

 

 

Regards,
Alice Zhang

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (7,723)