
Announcements
I have an attachment control in powerapps with SharePoint as the datasource. Documents uploaded in attachment control gets stored in document library via flow.
I need to add a validation on attachment control in Newform where it will allow only pdf, ppt, excel and word document.
User should not be able to submit form if the document doesnt matches above format. May i know how to add validation for the same?
Hi @Iantaylor2050 ,
Try this OnAddFile of the attachment control - you may have to fine-tune the extension list.
If(
Last(
Split(
Last(Self.Attachments).Name,
"."
)
) in
[
"docx",
"pdf",
"ppt",
"xlsx"
],
Reset(Self);
Notify(
"Only attach Word, Excel, PowerPoint or PDF files",
NotificationType.Error
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps