Restrict Attachment control in PowerApps to accept Excel files only
In one of the previous posts, we learnt how we can create a notification from Power Automate when a certain file-type is uploaded to a SharePoint Document Library.
In this post, we will learn how we can restrict Power Apps attachment control to accept only a certain file-type. We will use Excel file (.xlsx) as the accepted file-type, however this can be similarly customized to any file-type(s).
In the Attachment control, go the property OnAddFile and enter the following code:
UpdateContext(
{
validFileType: EndsWith(
Lower(Last(AttachmentControl.Attachments).Name),
"xlsx"
)
}
)
Comments
Post a Comment