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 / Allow only PDF Attachm...
Power Apps
Unanswered

Allow only PDF Attachment in the PowerApps form!

(0) ShareShare
ReportReport
Posted on by

Hi All, 

I am trying to prevent users from attaching any file extensions except PDF but I cannot find the right clue to do it. 

 

Note: I am able to do it if the user uploading only one PDF but in case of multiple files the collection read only the first one using the below formula :

If(!EndsWith(galAttachments.Selected.Name,"pdf"),DisplayMode.Edit,DisplayMode.Disabled)

Would you please help to sort this out? 

I want to use " ForAll(Colattachment, If(!EndsWith(galAttachments.Selected.Name,"pdf"),DisplayMode.Edit,DisplayMode.Disabled)

but I am getting an error. 

 

Thanks for the help! 

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Hassan-Elkhouli 

    Did you ever get this to work?

    I too have the same requirement of only allowing users to upload PDF file(s).

    What property did you set this fx on, I've tried on DisplayMode but get errors:

    If(!EndsWith(galAttachments.Selected.Name,"pdf"),DisplayMode.Edit,DisplayMode.Disabled)

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard