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 Apps / add additional text to...
Power Apps
Answered

add additional text to attachment via attachment control

(0) ShareShare
ReportReport
Posted on by 1,625

Hi,

I have an attachment control (SPO) in my canvas app, I would like to add some additional text to the name of the image, when a user uploads an image something like this:

 

SectionA-TodaysDate-Imagename

 

I cannot see how I can get this to work?

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Lefty ,

     

    Here is a flow I that can do this but you'll need to modify a few things:

     

    1. The trigger- make it 'when an item is created.

     

    DanielRK_0-1639140777353.png

    Excuse the overlap of actions (Ignore the apply to each above and continue with apply to each below):

    DanielRK_1-1639140877526.png

    DanielRK_2-1639141005250.png

     

    You need to change the 'file name' in the 'add attachment' action to your criteria.

     

    You can hard code this part: 'SectionA'- (without the quote marks)

     

    then add an expression like this (modify with your time zone and date formatting).

     

    convertFromUtc(UtcNow(), 'South Africa Standard Time', 'dd/M/yyyy H:mm tt')

     

    and then the 'displayname' dynamic property from the 'get attachment content' action where you choose the dynamic fields from.

     

    So it should look like this when put together:

     

    SectionA-Expression-displayname.

     

    The variable is to add consequtive numbers in case you have the same file names. You can drop this part if not relevant for you.

     

    Please let me know if this helps you.

     

    Regards,

     

    Daniel 

     

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    .

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    It's a pleasure, lets see if we can solve this.

     

    Perhaps trigger conditions can be useful but then we need to identify what conditions the flow must trigger as the flow expands. This can be based on that status column in combination with branching logic like that switch control you mentioned.

     

    Can you describe the process the item will go through over it's life?

     

    Here are some references that may further inform you of your options:

     

    1. Reza Dorrani- Avoid infinite loops with flow trigger conditions in Power Automate

     

    https://youtu.be/oKN4_5o2NUA

     

    2. April Dunnam- 

     

    https://youtu.be/xvmi21KomK0

     

    https://youtu.be/DT6BpixFbHY 

     

    Please let me know.

     

    Regards,

     

    Daniel

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey Daniel (@Anonymous) 

    Happy 2022.

     

    I've looked at the vids and found the the one from Reza helpful, so thanks for that (it helped with resolving the infinite loop I was in).

    My use case is similar to the answer you have responded with, but my requirements need to be extended.

    And I'm unsure if I should be using the same Flow and extending it or creating a new one.

    When an item is created my attachment name is renamed and a timestamp is added as per your flow.

     

    But my SP list items will also be modified at different stages in the lifecycle of the item. I will need to have the attachments renamed at at least 2 other stages, with say SectionB and SectionC added to the attachment names.

    The challenge I am seeing is, I can create another flow and use the trigger when item/file is modified, but I can see the attachments which were added earlier, which have already been renamed to SectionA, will be renamed again with lets say SectionB-TodayTimeStamp and then later to SectionC-TodayTimeStamp.

     

    Ideally what I would want is the attachments which have been renamed previously should not be overwritten by the flow.

     

    Apologies for hijacking this post.

     

    Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I'm truly sorry but I don't know the answer. I would need to spend time architecting a solution, building and testing it which I don't have right now.

     

    I don't know how to rename existing attachments but will write back if I find out. Please do the same.

     

    If I find anything that I think can help I will post back and once again I'm sorry I couldn't provide an immediate answer.

     

    Best of luck and write back when you've got it working!

     

    Perhaps you will be the author of this solution on this thread.

     

    Regards,

     

    Daniel

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard