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 / Cannot use attachment ...
Power Apps
Unanswered

Cannot use attachment in patch function..

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I have created an app in PowerApps that when it load, takes the records saved in a collection and patches them to a SharePoint list when it's connected to the internet, but I Cannot upload the attachments for each saved record in the collection, please find the screenshot, any idea?

 

thank you.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    Hi @U1EMOHAI ,

    There are only 3 ways of saving attachments

    • Using SubmitForm with an attachment control on the Form
    • Using Patch(FormName.Updates) with an attachment control on the Form
    • A far more complicated process using Power Automate and Add Attachment

    Other than #2 above, you cannot Patch attachment content from Power Apps. Unfortunately also you do not have the actual content of the attachments in your collection using your process- this post may assist with the process you may need to go through,

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • U1EMOHAI Profile Picture
    on at

    Hi @WarrenBelz 

     

    I have a button that will save the data in a collection (please find attached screenshot), the attachments were also saved in the collection for each record, but when I am trying to upload the data from the collection to SharePoint list it's not working with the attachments.. I can only upload other data..

     

    also, can you please advise how I can use "Patch(FormName.Updates)" in my current "OnStart" code (screenshot attached)?

     

    Thank you!

     

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    Hi @U1EMOHAI ,

    None of that is going to work with your offline file - I was simply noting (see second part of my comment) you do not have the content of the file in your collection presently so simply cannot save the attachments. The post I referred to (which also explains the reason for this) contains a suggestion of a rather complex alternative converting each attachment into Base64 text with JSON and saving in a Multiline text field in the collection. You would then have get these back and probably use Power Automate to save them after you create the item. If your code skills and understand are up to the task, you might want to have a go at this, but to be honest, you may have to forget about the attachments offline.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • U1EMOHAI Profile Picture
    on at

    Hi @WarrenBelz ,

     

    To be honest, I don't know how to do the JSON command for my case above; I tried reading from other sites; I appreciate it if you please show me how it can be implemented?

    The project I am working on has a limited timeline, and I must find a solution here, I appreciate everyone’s input on this topic. Thank you!

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    Hi @U1EMOHAI ,

    I have to be honest with you here - to head down that path I would basically need to build a model and write the entire functionality for you and even then, I am not totally confident I would get you a working solution. I have tackled this before with offline photos and the end result was to leave them on the device camera file and the user then attached or uploaded them when on line.

  • ankit12 Profile Picture
    4 on at

    It does not work with Patch Function, however, it works with Update function

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard