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 / Attachment controls
Power Apps
Suggested Answer

Attachment controls

(3) ShareShare
ReportReport
Posted on by 8
In form , i have attachment control
i want to show Already uploaded attachment show  in view mode and new attachment show in edit mode 
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    3,653 on at

    Hi @CU04011210-0

    Let's utilize the DisplayMode property, every control in Power Apps has a DisplayMode property. You can leverage this to switch between View and Edit.

    For your Attachment control:

    DisplayMode = If(FormMode = FormMode.View, DisplayMode.View, DisplayMode.Edit)
    
    • When the form is in View mode, attachments are shown but cannot be modified.
    • When the form is in Edit mode, users can upload new attachments.
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    For the Attachment control DisplayMode property:

    If(Form1.Mode = FormMode.View, DisplayMode.View, DisplayMode.Edit)
  • Suggested answer
    Valantis Profile Picture
    6,735 on at
     

    Set the Attachments control to inherit the form’s mode.

    • Put the Attachments card inside your form, unlock it if needed.
    • Set Attachments.DisplayMode = Parent.DisplayMode
    • Switch modes with ViewForm(FormName) for read-only (shows existing files) and EditForm(FormName) for add/remove; save with SubmitForm(FormName).

     

    check also the Sources if more info needed:

     

     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

     

  • Suggested answer
    DP_Prabh Profile Picture
    381 on at

    I think you should use two controls and toggle DisplayMode for this. Canvas Attachment control cannot show existing files in View mode while allowing new uploads in the same control, so the according to me the pattern should be like:

    View Mode → Existing attachments shown in gallery. Edit Mode → Attachment control enabled for uploading new files.

    1. Attachment control (for upload)
    Formula: DisplayMode = If(ViewMode, DisplayMode.Disabled, DisplayMode.Edit)
     
    2. Gallery / Data table (to show existing attachments)
    Items = Attachments from the record (SharePoint / Dataverse). Visible only in View mode.
     
    Upload Attachment Control
    DisplayMode = If(varFormMode="View", DisplayMode.Disabled, DisplayMode.Edit)

    Gallery to show uploaded files
    Items = ThisItem.Attachments
    Visible = varFormMode="View"

    Reference: Attachment control limitations(https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/controls/control-attachments)

    I hope this works for you!

  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @CU04011210-0

    If the Attachment control is already inside the form, you usually don’t need to add any condition for View or Edit mode because it automatically follows the form mode.

    If the goal is to separate already uploaded attachments from new ones in Edit mode, one simple approach is to show the existing attachments in a Gallery inside the same DataCard so users can easily view them, and keep the Attachment control for uploading new files. 

    Add attachment control inside the Attachment DataCard. 

    Attachment Control Items Property: 

    Parent.Default

    Gallery Item Property: 

    ThisItem.Attachments

    Gallery Visible Condition: (On Visible Property)

    ThisItem.'Has attachments'

    Gallery Hight Property: 

    Self.AllItemsCount*Self.TemplateHeight

    This makes it clearer for users because they can see the previously uploaded files separately and still use the attachment control to add new ones.

     

    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------

    📩 Need more help? Just mention @Kalathiya and I’ll be happy to assist.

    ✔️ If this answer helped you, please tick “Does this answer your question?” so it can be marked as the Verified Answer.

    💛 A Like always motivates me to keep contributing!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard