cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alex_AR
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
ChristianAbata
Super User II
Super User II

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

v-alzhan-msft
Community Support
Community Support

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
Jay-Encodian
Super User II
Super User II

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

ChristianAbata
Super User II
Super User II

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

v-alzhan-msft
Community Support
Community Support

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
Frequent Visitor

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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