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

Upload new attachments without being able to delete previous ones

Is there any way to have users be able to upload files through an attachments control, but not be able to delete any previously attached files?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Upload new attachments without being able to delete previous ones

Hi @MarcoQ96 

Do you want your users being able to attach new files but not being able to delete previously attached files?

If you want to disable the "delete files" function directly, there is currently no such feature.

I made a similar test as follows,you can try this:

Create an edit form with Attachments control.

Set the Attachments control’s OnRemoveFile: 

Collect(context1,{context1:"context1"})

Set the Button’s OnSelect: 

If(IsEmpty(context1),SubmitForm(Form1),Notify("you can't delete files",Error));Clear(context1)

test1_48.jpg

After these settings, users will not be able to delete previously attached files.

 

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.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Upload new attachments without being able to delete previous ones

Hi @MarcoQ96 

Do you want your users being able to attach new files but not being able to delete previously attached files?

If you want to disable the "delete files" function directly, there is currently no such feature.

I made a similar test as follows,you can try this:

Create an edit form with Attachments control.

Set the Attachments control’s OnRemoveFile: 

Collect(context1,{context1:"context1"})

Set the Button’s OnSelect: 

If(IsEmpty(context1),SubmitForm(Form1),Notify("you can't delete files",Error));Clear(context1)

test1_48.jpg

After these settings, users will not be able to delete previously attached files.

 

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.
lavint
Level: Powered On

Re: Upload new attachments without being able to delete previous ones

Hello,

 

Why do we need "context1" at the end?

Collect(context1,{context1:"context1"})

Submit form is to save the whole item to the list OR just save the attachment? 

If(IsEmpty(context1),SubmitForm(Form1),Notify("you can't delete files",Error));Clear(context1)

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

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

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 63 members 4,752 guests
Please welcome our newest community members: