| Mustafa Usmani
Add Attachment to SharePoint List using PATCH function
At the moment, there’s no method to Patch attachments to a SharePoint list but there’s a workaround available which lets you patch attachments with other data fields that you want to patch. Let’s see how we can achieve this.
- Insert an edit form of the SharePoint list where you want to patch and select only the Attachments column in the form.
- Now on any button’s OnSelect write your Patch command in the way that is shown below.
- As you can see the first portion of our Patch command is straightforward that we are creating a new record in a table but after giving the record we are using that form’s update attribute to fetch attachments from the form that were added by the user. And this way whenever a new record is created, the attachment will also be saved with its respective item.
Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.