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

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

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 :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Highlighted
Community Support
Community Support

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

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

Highlighted
Super User III
Super User III

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 :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Highlighted
Community Support
Community Support

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

Highlighted
Frequent Visitor

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

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
Top Kudoed Authors
Users online (7,819)