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:
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.
Solved! Go to Solution.
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.
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.
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.
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.
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!
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 <> ""
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Your chance to join an engaging competition of Power Platform enthusiasts.