Attachments control in PowerApps
A control that allows users to download files to their device, as well as upload and delete files from a SharePoint list or a Common Data Service entity.
The attachment control has these limitations:
Attachments are supported with SharePoint lists and Common Data Service entities.
Upload and delete functionality only work inside a form. Attachment control will look disabled when in Edit mode and not inside a form. Note that in order to save the file additions and deletions to the back end, the end user must save the form.
You can only upload files up to 10 MB in size.
An Attachments control lets you open, add, and delete files from a SharePoint list or a Common Data Service entity.
Items – The source describing the files that can be downloaded.
MaxAttachments – The maximum number of files the control will accept.
MaxAttachmentSize – The maximum allowed file size in MB of each new attachment. Currently there is a limit of 10 MB.
OnAttach – How the app responds when the user adds a new file attachment.
OnRemove – How the app responds when the user deletes an existing attachment.
OnSelect – How the app responds when the user clicks on an attachment.
AccessibleLabel – Label for screen readers. Should describe the purpose of the attachments.
AddAttachmentText – The label text for the link used to add a new attachment.
BorderColor – The color of a control's border.
BorderStyle – Whether a control's border is Solid, Dashed, Dotted, or None.
BorderThickness – The thickness of a control's border.
DisplayMode – Whether the control allows adding and deleting files (Edit), only displays data (View), or is disabled (Disabled).
FocusedBorderColor – The color of a control's border when the control is focused.
FocusedBorderThickness – The thickness of a control's border when the control is focused.
Height – The distance between a control's top and bottom edges.
MaxAttachmentsText – The text that replaces the "Attach file" link when the control contains the maximum number of files allowed.
NoAttachmentsText – Informational text shown to the user when there are no files attached.
TabIndex – Keyboard navigation order in relation to other controls.
Visible – Whether a control is visible or hidden.
Width – The distance between a control's left and right edges.
X – The distance between the left edge of a control and the left edge of its parent container (or screen, if no parent container).
Y – The distance between the top edge of a control and the top edge of the parent container (or screen, if no parent container).
Create an app from data using a SharePoint list as a data source. As an alternative, add a form to your app, and set a SharePoint list as its data source.
Select the Form control in the tree view on the left-hand side.
Click Data in the Properties tab in the options panel on the right.
Under Fields, enable the Attachments field.
The Attachments field associated with the SharePoint list will appear in the form.
[Learn how to add and configure a control].(../add-configure-controls.md)
There must be adequate color contrast between:
- ItemColor and ItemFill
- ItemHoverColor and ItemHoverFill
- ItemPressedColor and ItemPressedFill
- AddedItemColor and AddedItemFill
- RemovedItemColor and RemovedItemFill
- ItemErrorColor and ItemErrorFill
- AddAttachmentColor and Fill
- MaxAttachmentsColor and Fill
- NoAttachmentsColor and Fill
This is in addition to the standard color contrast requirements.
Screen reader support
The following properties must be present:
We’d love to hear your thoughts. Choose the type you’d like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.