cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Phu_Le
Level: Powered On

Set button for attachment (Hide the attachment box)

Hi, please help me those question

1. Can we set a button for active attachment file. (I dont want to show the Attachment Box, because the editor is able to delete the other attached file)

2. Can we set Attachment Box is only accept to attach image file or take a photo from camera. Thanks

Capture3.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Set button for attachment (Hide the attachment box)

Hi @Phu_Le ,

1)I'm afraid it's not supported to use a button to attach file to the attachment field currently.

You could only use attachment control to make this.

2)I suggest you set the attachment control's OnRemove property.

Here's my test for your reference:

Set the attachment control's OnAddFile: Set(test,"Yes")

                                               OnRemoveFile Set(test,"No")

Set the submit button's OnSelect: 

If(test="No",Notify("you can't delete attached file",NotificationType.Warning),SubmitForm(Form1))

Then, if you delete the attached file, the form can't be submitted.

What's more, here's a similar idea that posted by other users, you could vote for him:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Allow-quot-add-only-quot-mode-to-Attachment-cont...

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Set button for attachment (Hide the attachment box)

Hi @Phu_Le ,

1)I'm afraid it's not supported to use a button to attach file to the attachment field currently.

You could only use attachment control to make this.

2)I suggest you set the attachment control's OnRemove property.

Here's my test for your reference:

Set the attachment control's OnAddFile: Set(test,"Yes")

                                               OnRemoveFile Set(test,"No")

Set the submit button's OnSelect: 

If(test="No",Notify("you can't delete attached file",NotificationType.Warning),SubmitForm(Form1))

Then, if you delete the attached file, the form can't be submitted.

What's more, here's a similar idea that posted by other users, you could vote for him:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Allow-quot-add-only-quot-mode-to-Attachment-cont...

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 342 members 6,252 guests
Please welcome our newest community members: