cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Perez
Helper V
Helper V

save attachment to a sharepoint list

Hi,

i copied an attachment componnet from a form to my app screen, i.e. the attachment is not part of an edit form.

how can i save it into the sharepoint list?

i tried the below, but its not working:

Patch('Brief Process',
 Defaults('Brief Process'),({
..
..
 Attachments:AttachmentField.Attachments})

thanks,

Eyal

3 REPLIES 3
Ethan_R
Responsive Resident
Responsive Resident

Hi @Perez ,

I would like to suggest you this YT Video from Shane.

I've used it and it simply works perfectly.

 

Hope this helps.

Hi @Ethan_R ,

thanks for your reply.

i tried the method explained in Shane's video, but didn’t succeeded.

in the video it is saved into a document library while I’m trying to save into a SharePoint list.

i made the following necessary changes:

  1. i used the add attachment activity rather than create file
  2. after the patch activity into the list i added this formula:

 

EasyUpload.Run(Last(AttachmentField.Attachments).Name,"" ,"",varBase64Only,Last(Sort('Amdocs Agency - Brief Process',ID,Ascending)).ID);

 

 

i couldn’t add it a s part of the patch as i need to get the ID of the created item.

any idea?

 

 

Ramole
Memorable Member
Memorable Member

Hi @Perez 

 

If you want to add a attachment to a SP list item using Patch function directly, I afraid that there is no way to achieve  in PowerApps currently.

 

You can do it via Attachments field within the Edit form. Use a formula like below:

 

 

 

Patch('Brief Process',
 Defaults('Brief Process'),({
..
..
 },YourEditFormName.Updates)

 

 

 

If this post helps, then please consider Accept it as the solution to help the others

 

Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (3,145)