cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Alex_AR
Level: Powered On

Sharepoint-Extracting a portion of a word document's file name

I have the following compose function to extract a file name. I would like to extract the date at the end of the file using another compose function and use the date as an output. Any idea how to extract the date from the file name? Thank you 

 

Untitled2.png

 

 

 
2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Sharepoint-Extracting a portion of a word document's file name

You can simple add a split like this.

help1.PNG

 

as you see I get only the date

simple.PNG

 





Did I answer your question? Please consider to Mark
my post as a solution! to guide others 😉


Proud to be a Flownaut!





View solution in original post

Community Support Team
Community Support Team

Re: Sharepoint-Extracting a portion of a word document's file name

Hi @Alex_AR ,

 

Please refer to screenshot below to create the flow:

1.png

 

The expression in the Compose 2 as below:

substring(outputs('Composeoutputfilename'),sub(length(outputs('Composeoutputfilename')),10),10)

 

Best regards,
Alice       
 
Community Support Team _ Alice Zhang
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

4 REPLIES 4
Super User
Super User

Re: Sharepoint-Extracting a portion of a word document's file name

Hey @Alex_AR 

This expression works:

substring(variables('Data'),add(lastIndexOf(variables('Data'),'_'),1),sub(length(variables('Data')),add(lastIndexOf(variables('Data'),'_'),1)))

1.png

 

HTH

Jay

Super User
Super User

Re: Sharepoint-Extracting a portion of a word document's file name

You can simple add a split like this.

help1.PNG

 

as you see I get only the date

simple.PNG

 





Did I answer your question? Please consider to Mark
my post as a solution! to guide others 😉


Proud to be a Flownaut!





View solution in original post

Community Support Team
Community Support Team

Re: Sharepoint-Extracting a portion of a word document's file name

Hi @Alex_AR ,

 

Please refer to screenshot below to create the flow:

1.png

 

The expression in the Compose 2 as below:

substring(outputs('Composeoutputfilename'),sub(length(outputs('Composeoutputfilename')),10),10)

 

Best regards,
Alice       
 
Community Support Team _ Alice Zhang
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

Alex_AR
Level: Powered On

Re: Sharepoint-Extracting a portion of a word document's file name

Thank you all for your help 👍......Amazing how you can tackle it in different ways and get the same result. The more I learn the more I understand the logic behind each function. 

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,000)