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 : nBD82rjkkToRcKc4obzezD
Power Apps - Building Power Apps
Unanswered

Hide "unsaved" label in attachment control?

Like (1) ShareShare
ReportReport
Posted on 23 Aug 2022 21:39:32 by 43

Hello! My app has one attachment control that the user can interact with. When they add their attachments, the attachments are copied to a hidden form, which is submitted to a temporary SP list, and a Power Automate flow runs in the background to grab that list item and get some extra data to return to the app.

My problem is that the attachment control the user sees says "unsaved" next to all of the attachments. My understanding is that this is because the control is not attached to a form that gets submitted. I don't want to use a temporary list, because I'm trying to not clutter up my tenant. Is there a way to hide this label?Unsaved labelUnsaved label

Categories:
I have the same question (0)
  • CU25072105-1 Profile Picture
    1 on 25 Jul 2024 at 21:07:26
    Hide "unsaved" label in attachment control?
    Set the Items property of the Attachments control to the name of a collection.
    Place a button, set the OnSelect to copy the the Attachments into the collection.
     
    ClearCollect(colAttachments, AttachmentsControl.Attachments)
     
  • adriansuteu9333 Profile Picture
    2 on 29 Apr 2024 at 10:54:01
    Re: Hide "unsaved" label in attachment control?

    Hello.

     

    In case anyone still needs to do this, I found a workaround:

    I had to use this on a Power Apps form with a single attachment enabled, but you can extend it to more than 1 with similar logic.

     

    Steps I used:

    • Add a Attachment type field on the Power Apps form (data type came from the source in my case).
    • Add 2 additional elements in this control: AttachmentNameText - text label, AttachmentNameFill - rectangle.

    adriansuteu9333_0-1714386787643.png

     

    • Create a variable (varAttachmentName).
    • Set it to attachment name in OnAddFile Action of the Attachment control (first item from DataCardValue1 in my case).

     

    Set (
     varAttachmentName,
     First(DataCardValue1.Attachments).Name
    )

     

    • Set it on blank for OnRemoveFile Action of the same control.

     

     Set (
     varAttachmentName,
     ""
    )

     

    • Position the rectangle over the usual file name (make sure you leave space for the attachment type icon and the X - remove attachment icon).
    • Make the rectangle background white (or whichever color is the main control background in your case).
    • Set it to be visible (Visible property) only if there is a file attached (otherwise you want the "There is nothing attached" text to be visible):

     

    Len(varAttachmentName) > 0

     

    adriansuteu9333_1-1714386948559.png

    • Set the newly created text label to cover the same space as the rectangle.
    • Set the Text property of it to the attachment name (below you can see a workaround I used to avoid multiple line scroll in case the name is longer than the space available):

     

    If (
     Len(varAttachmentName) <= 38,
     varAttachmentName,
     Left(
     varAttachmentName,
     35
     ) & "..."
    )

     



    Final result:

    • Nothing attached:

    adriansuteu9333_2-1714387815366.png

    • File is attached:

    adriansuteu9333_3-1714387858393.png

     

    PS: You'll have to disable the ItemHoverFill of the attachment control (by setting it to the same color as the background). 

     

  • jutrust Profile Picture
    43 on 11 Nov 2022 at 13:43:46
    Re: Hide "unsaved" label in attachment control?

    Hey! Like I said, I do still think it's because my attachment control isn't attached to a specific form. For my use case, it's never going to be so.... My workaround was to follow one of the tutorials that uploads an attachment one at a time using an attachment control, an image control, and a flow. (Ex. Power Apps Attachments for SharePoint - Files, Images, and Signatures - YouTube) On upload, you clear the attachment control and (IMPORTANT) add the attachment info (name, size from the flow if you want, etc) to a collection. THEN show the collection in a gallery. Basically, create your own little gallery for finished attachments and put a "Saved" label on each item there 🙂

    Since you clear the attachment control after each attachment, you'll never see the "Unsaved" label. Works for me anyway lol

  • Alfa741 Profile Picture
    on 10 Nov 2022 at 15:28:03
    Re: Hide "unsaved" label in attachment control?

    Hi,

    any news on that topic? I got the exact same issue. Dis you find a workaround?

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on 24 Aug 2022 at 14:36:19
    Re: Hide "unsaved" label in attachment control?

    As far as I know it is not possible to customize this message.

    See this: https://powerusers.microsoft.com/t5/Building-Power-Apps/Remove-edit-unsaved-text-from-attachment-field/m-p/745262#M238233

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…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete