web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Attachment Patching Su...
Power Apps
Unanswered

Attachment Patching Suddenly Stopped Working

(1) ShareShare
ReportReport
Posted on by 10

I have a PowerApp set up where there is an attachment field on a form using SharePoint. This attachment field used the 'Patch' function to automatically save attachments within OnAddFile. Recently, this functionality seems to have stopped working and I'm not sure why.

 

#OnAddFile:
Patch('Product Phase', First(Filter('Product Phase', ID=gal_product_phase.Selected.Id)), frm_product_atch.Updates);

 

This used to behave as expected and any attachment would immediately save to the form when being attached. This is how we want it to behave. I was informed this stopped working roughly a week ago when a user asked why they could no longer attach files to the form. It turns out this is happening for all users, myself included.

 

I have spent hours trying to debug this but cannot figure out why it no longer works. The attachment field now resets to its previous state when the Patch is run. I have tried separating this into a button which patches the form instead, but it behaves the same way: new attachments are discarded. The Selected form ID matches the ID of the target form and all other fields on the form update correctly.

 

I am experiencing the same behavior on other forms I have built as well. It seems like something changed in PowerApps that disabled this behavior.

 

Was this functionality changed? How are attachments supposed to be saved to a form now?

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    I understand that you're facing issues with the attachment functionality in your PowerApp. While I don't have access to the latest updates and changes in PowerApps beyond my knowledge cutoff in September 2021, I can provide you with some general troubleshooting steps to help you identify and resolve the issue.

    1. Verify SharePoint connection: Double-check that the connection to your SharePoint site is still valid and hasn't encountered any authentication or permission-related issues. Ensure that the connection is properly established and authorized to access the SharePoint list where the attachments are being saved.

    2. Check field mapping: Make sure that the field you're patching the attachments to ('frm_product_atch') matches the correct field in the SharePoint list. Verify that the field's internal name in SharePoint hasn't been changed, as this could cause issues with the patching process.

    3. Test with a different attachment field: Create a new attachment field on the form or use an existing one if available. Modify your patch formula to target this new field and test if the attachments are properly saved. This will help determine if the issue is specific to the attachment field or if it's a broader problem with your app.

    4. Review recent changes: Consider any recent changes that might have affected the attachment functionality. This could include updates to PowerApps itself, changes in the SharePoint environment, or modifications to the app itself. Check if any updates were installed or configurations were modified around the time the issue started occurring.

    5. Test on a different environment: Create a test environment with a fresh PowerApp and SharePoint connection. Replicate the form and attachment functionality in the test environment to see if the problem persists. If attachments work correctly in the new environment, it could indicate that the issue is specific to your current environment.

  • ZachB Profile Picture
    10 on at

    Hi Shaheer,

     

    I can confirm I have already done all of the above steps in testing prior to creating this thread. This appears to be occurring between all attachment fields, all environments, and all SharePoint lists.

     

    From what I can tell browsing other threads on the forum, this appears to be a functionality issue with the latest version of PowerApps.

  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    Maybe... Could be...

  • FraJuDee Profile Picture
    39 on at

    It indeed is a bug. All the event handlers (On...) in galleries seem to be buggy. If possible, try to convert your release to the previous .41 version. Unfortunately, that does not seem to be available to most users, so the only thing which can be done is waiting for Microsoft.

  • ZachB Profile Picture
    10 on at

    Just wanted to follow up on this - I have tried reverting to the previous version, as well as the oldest and newest versions available to me, and this problem seems to persist across all available versions. I'm not entirely confident changing the version is having any demonstrable effect on my forms.

     

    Regardless of my adjusting the version, it appears other issues are starting to crop up with form saving in general. Some of my previously-working-just-fine apps are completely unusable at the moment and the Patch function is completely wiping user data. Is Microsoft aware of these issues?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard