web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Extract properties from filename and tag SharePoint metadata

(0) ShareShare
ReportReport
Posted on by

I built several workflows in SharePoint designer that extracted information from the filename and tagged the file with the appropriate metadata.

For example:

Doe, John - 8Hr Safety Training Course 2021-08-26

When I built this in SPD, I used the location of '-' to figure out where to extract the person's name, the location of 'Hr' to extract the hours, extracted the date off of the end since it is always a fixed number of characters, and extracted the name of the course using the 'Hr' location and the fixed position of the date from the end of the string.

 

I have extracted the course hours and the person's name, but have not been able to extract a specific number of characters from the end of the string.  

I have the same question (0)
  • Verified answer
    v-LilyW-msft Profile Picture
    on at
    Re: Extract properties from filename and tag SharePoint metadata

    Hi @Anonymous 

    If you want to get the date from 'Doe, John - 8Hr Safety Training Course 2021-08-26',you can refer to:

    Expression:sub(length(outputs('Compose')), 10)

    vLilyWmsft_1-1630029286158.png

    Expression:substring(outputs('Compose'), outputs('Compose_2'), 10)
    vLilyWmsft_3-1630029455655.png
    Result:
    vLilyWmsft_5-1630029489071.png

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 647 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 350 Moderator

#3
developerAJ Profile Picture

developerAJ 256

Last 30 days Overall leaderboard