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
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
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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 186 members 4,541 guests
Please welcome our newest community members: