cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
addy2019
Advocate IV
Advocate IV

Is it not possible to attach files in Sharepointlist using Patch?

I have read some articles which says its not possible to attach files to sharepointlist using Patch. Is it true? If this feature is missing its a huge drawback, when all different kinds of fields can be patched why not attachments?

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @addy2019 :

In theory, using form control and submitform function is the only way to add attachments to existing records in a canvas app.

If you insist on using Patch function------as an alternative solution, you could consider take a try to only add the Attachments field within the Edit form. I have made a test on my side, please take a try with the following workaround:

1.JPG2.JPG

Set the OnSelect property of the "Submit" button to following formula:

Patch(
'20180921_case2', /* <-- My SP List */
Defaults('20180921_case2'),
{Title:"PowerApps3",TaskName:"Task3",NoOpportunity:true,NoOpp_PostSales_x0020_:true},
EditForm1.Updates
)

Note: The Editform1 represents the Edit form control within your app, which only display the Attachments field. 

Please also check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Need-to-add-Attachment-to-a-PATCH-to-a-Share...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Saving-attachments-using-Patch/td-p/277984

Best Rergards,

Bof

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @addy2019 ,

No - it is not unfortunately.

You can however possibly do it with Power Automate, but is far more complex and depends on what you are trying to attach and where you are getting it from.

 

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.

v-bofeng-msft
Community Support
Community Support

Hi @addy2019 :

In theory, using form control and submitform function is the only way to add attachments to existing records in a canvas app.

If you insist on using Patch function------as an alternative solution, you could consider take a try to only add the Attachments field within the Edit form. I have made a test on my side, please take a try with the following workaround:

1.JPG2.JPG

Set the OnSelect property of the "Submit" button to following formula:

Patch(
'20180921_case2', /* <-- My SP List */
Defaults('20180921_case2'),
{Title:"PowerApps3",TaskName:"Task3",NoOpportunity:true,NoOpp_PostSales_x0020_:true},
EditForm1.Updates
)

Note: The Editform1 represents the Edit form control within your app, which only display the Attachments field. 

Please also check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Need-to-add-Attachment-to-a-PATCH-to-a-Share...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Saving-attachments-using-Patch/td-p/277984

Best Rergards,

Bof

View solution in original post

addy2019
Advocate IV
Advocate IV

EditForm1.Updates represents whole form & there could be other fields as well. That would be a workaround. For now I'm going with SubmitForm() workaround (with only attachment as one field present in the form).  Not sure if there's already any progress in this function by Microsoft but I'm submitting an idea anyway for it please vote if you feel we should be able to Patch the attachment fields.

 

Patch Attachment fields not possible - Power Platform Community (microsoft.com)

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,919)