cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Cannot Clear Attachments in PowerApps

Hi,

 

I have created an app which has the possibility to add an attachment, and therefore is connected to a SharePoint list.

When I'm done creating an item in the SharePoint list with PowerApps and have added an attachment, I want to create a second item. But when I get to the screen where to add an attachment, the attachment from the previous added item is still visible.

This looks like the same problem as multiple users have described here and for those users there isn't a solution yet. Only for the poster of the item.

 

I have tried to use this:

ResetForm(EditForm1);NewForm(EditForm1);Navigate(EditScreen1,ScreenTransition.Fade)

All the fields are being resetted, except the attachment field.

 

If I remove the attachment with the "X" when I add the second item, and click on a button which have only ResetForm and NewForm as onSelect, the attachment will return. So, apparently the attachment wasn't really removed by clicking the X, otherwise it would not return right?

 

Any help would be appreciated on this strange matter.

 

 

39 REPLIES 39

Experience same issue for the attachment control in edit form. So strange that don't know how to convince my customer to accept. Yet I cant find workaround after 2 days.

Anonymous
Not applicable

Thank you! Removing Parent.Default on Attachments worked for my form that was showing old attachments.  I also had other fields showing old data.  The problem started for me when I published the form in Edit Mode with existing data.   If you remove the Parent.Default from other fields they will not save back to SharePoint.  To fix the caching issue, I had to change the default mode of the form to "New" and clear all the data out before publishing again.  

Frequent Visitor

By removing Parent.Default in the items, the attachments don't appear on a form in Edit mode when revising the form.

Frequent Visitor

I was able to clear the attachment from appearing by changing the Sarepointform1 DATA DefaultMode to FormMode.Edit vs FormMode.New.

 

 

Frequent Visitor

I am facing the same issue for 1 of my SharePoint Custom Forms.

Tried ResetForm(SharePointForm1);

I have read through this entire thread and still have the issue. I will reiterate the issue:
I have a Powerapp displayed on a SharePoint page and fill out the form. All fields show as blank as it's a New form. I submit the form and have another screen with a button to "Submit another form". 

That button has a formula Resetform(form1);newform(form1);navigate(form1screen).

This resets/creates new form except for displaying an attachment in the attachment field. This attachment is the one submitted on the first item in the list, not even the one I just submitted.

I have changed items from Parent.Default to ThisItem.Attachments but that doesn't work either.

Hi There,

 

I have the same issue and have been waiting for some resolution.

Meanwhile, I have restored the very 1st test item I had created in this list and kept it in the list with attachment field blank.
This provided a Band-Aid solution and my new form does not show attachments anymore.

Advocate I
Advocate I

The best way I found to handle the toggle between if a file is attached is to use this: I got this from another person. It allows you to control a variable which you can refer to in other places. So before my user goes to the screen to enter info and attach a file/pic, the variable is set to false, then when they add the file, under Action and OnAddFile it get set to true. This is extremely handy!

srose_0-1600097477199.png

 

Hi @srose

First off, thank you so much as this looks like it has fixed my issue, but I don't quite understand why... I've added Set(isAttached, false) to onNew in SharePointIntegration, and mimicked your picture for the Attachment fields OnAddFile and OnRemoveFile, and it seems to have resolved my issues, but I don't understand how.  Do I need to add these OnAddFile and OnRemoveFile to my attachment fields for my Edit Form and View Form?

 

Thank you for your help ahead of time! 

I am not exactly clear on your question -- maybe this helps: So my app allows only one attachment at a time And I am using a document library vs. a SharePoint list. Also, I need a button to become visible only if user has added an attachment -- so I use the additional true/false variable and OnAddFile, etc. for a few things in my case: the Visible setting for my button is this formula:

CCOwner.Selected.Value <> "-" And Vendor.Text <> "" And Office.Selected.Value <> "-" And Amt.Text <> "" And IsAttached = true And TaxPaid.Selected.Value <> "-" And ProjTask.Text <> ""

 

Thanks!

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,397)