cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hassan-Elkhouli
Regular Visitor

Allow only PDF Attachment in the PowerApps form!

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! 

1 REPLY 1
Anonymous
Not applicable

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)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,472)