web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
Power Apps - Building Power Apps
Answered

Special Characters in attachments file name

Like (0) ShareShare
ReportReport
Posted on 20 Oct 2023 14:06:35 by 20

Hello!

 

I have a canvas app with a form that allows users to upload attachments. The issue is that users upload attachments that have special characters in the file name, and then they are not successfully saved to the SharePoint. Is there a way to show an error message when the file name of a chosen attachment includes a special character before it can be submitted in the app?

  • Verified answer
    BCBuizer Profile Picture
    22,262 Super User 2025 Season 2 on 20 Oct 2023 at 15:21:50
    Re: Special Characters in attachments file name

    Hi @LindseyT ,

     

    Assuming tha AttachmentsComponent is a regular Attachments control, the below should work:

     

    If(
     "Error" in ForAll(
     AttachmentsComponent.Attachments,
     If(
     IsMatch(
     ThisRecord.Name,
     ".*[\\\""<>!@#$%^&*].*"
     ),
     "Error"
     )
     ),
     Notify("No special characters in filename please", NotificationType.Error),
     <Upload file>
    )
    

     

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete