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
Community Support Team
Community Support Team

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
Super User
Super User

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
Community Support Team
Community Support Team

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,433)