Power Apps – Remove ‘Max number files reached’ in Attachment Control

3 steps

Introduction:

This is the blueprint for an attachment control that removes the message where it tells the user that max number of files has been reached. There is no out-of-the-box way to do the said task but we will do a workaround.


Step 1:

Insert a container named Container1.


Step 2:

Steal an attachment control. Name it AttachmentControl. Place it inside Container1. Change the following properties:

Width property

Parent.Width

Height property

500

MaxAttachments property

5

BorderColor property

Color.Transparent

Items property

Blank()

Tooltip property

""

Step 3:

Select Container1. Change the following properties:

Height property

Max(100,CountRows(AttachmentControl.Attachments) 
* 48 + 48) - If(CountRows(AttachmentControl.Attachments) 
= AttachmentControl.MaxAttachments, 68)

Conclusion:

To test, attach up to 5 files using the attachment control. You will notice that as you attach, the borders of the container adjust depending on the number of files attached. This will also remove the ‘Max number files reached’ message when it has reached the capacity.


Did this article help? Let us know how we can improve. Send us a message by clicking the “Contact Us” button below.

 

Article last updated on Apr 16, 2024


Need expert guidance on Power Apps?