I have created an app where I want to patch an attachment field to a SharePoint List, but the attachments field is not listed as a field in my SharePoint list per powerapps notification. I know I can attach files using the edit form feature, but all of the other fields in my app are not within a form. Help! 🙂
Solved! Go to Solution.
Here's how I got accomplished this after I could not get @v-xida-msft 's method to work.
Scenario:
Patch(SharepointList, LookUp(SharepointList, eventId = varEventId), frmMainForm.Updates, frmAttachments.Updates
)
Hope this helps!
@ericonlineThe only thing I don't understand is why you are using Lookup, if you can please explain it, that would be great. Thanks!
The LookUp function is used to identify a single record in a DataSource. Since I want to add attachments to only a single record, I use LookUp. In some cases, you could also use First(Filter()) to perform the same.
You need to put whatever text fields/dropdowns/dates etc inside of the patch OBJECT section... then (because Patch() allows for extra parameters) you add another parameter to patch... called Form1.Updates. So that will patch all records you created (your custom form) AND it will grab the "update" info from your form, (where the only field is Attachments) and will include all of that in 1 single patch.
I did not know you could access all of a form Updates in a patch call. This saved my bacon working with item level permissions, Thank you @ericonline
Hi,
Is there a way to send the attachment which already present in the selected item from a gallery.
EditForm1.Updates
This will update if any new attachments are added but existing one will not patch to the SP list. What can be done to patch the existing attachment in that particular selected record?? Any hints please.
This is by far the easiest way I've found using power automate - https://youtu.be/yC0W5am6M3Q
How can I do this directly in a canvas app without using Power Automate? Is that possible?
I want to copy the attachments from an item in list A to an existing item in a totally different list, call it list B. It does not seem like PowerApps allows for programmatically copying attachments between items in different SharePoint lists. Can someone confirm if this is true?
See my response in this other thread.
User | Count |
---|---|
254 | |
106 | |
84 | |
51 | |
43 |