cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Avallon
Frequent Visitor

Create SharePoint list item from attachment, removing file extension

Hi,

 

I've created a flow to create a SharePoint list item when an email arrives. I would like the title field to be the attachment filename without the extension.

 

I've searched but been unable to find the right code to strip the extension from the file name.

 

Any help would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @Avallon,

 

You could get the name without extension of the attachment by using the function provided by Expression.

Formula reference:

 

replace(items('Apply_to_each')['Name'],concat('.',last(split(items('Apply_to_each')['Name'],'.'))),'')

Flow configuration:

17.PNG

Output result:

18.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

Hi @Avallon,

 

You could get the name without extension of the attachment by using the function provided by Expression.

Formula reference:

 

replace(items('Apply_to_each')['Name'],concat('.',last(split(items('Apply_to_each')['Name'],'.'))),'')

Flow configuration:

17.PNG

Output result:

18.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Avallon
Frequent Visitor

Hi - that worked great. Apologies for the delay in coming back to you - the reply notification ended up in my spam folder.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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,504)