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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extract first 6 charac...
Power Automate
Answered

Extract first 6 characters of attachment name in document library and place in new field

(0) ShareShare
ReportReport
Posted on by 5

Hi All,

 

I have a quick flow that gets the attachment properties and applies the a partial name only to a new Field called "Document Number".

 

example attachment names:

"123456 Finance Procedure.docx"

"987654 Human Resources.docx"

 

Example results once the flow runs

Document Number (Field):

123456 Finance Procedure

987654 Human Resources

 

I need the field to display just the first 6 characters of the file name. As example:

Document Number (Field):

123456

987654

 

I've tried the LEFT function but, could work it out.

 

If you could provide an example that would be great.

 

thank you

Categories:
  • Verified answer
    Paulie78 Profile Picture
    8,424 Moderator on at

    Use the substring expression, example:

    substring(outputs('Document_Number'),0, 6)

     Substring.PNG

     

    Please...

    If I answered your question Accept it as a solution ✔️ 

    If I helped you out, please give me some Kudos 👍

    Thanks 😙

  • luke5 Profile Picture
    5 on at

    luke5_0-1603974452518.png

    Here is the flow I used, the "Outputs" in the "Document Number" field comes from the "Compose 2".

     

    Much appreciated !

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard