cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MaxF
Frequent Visitor

Patch item with attachments to sharepoint list without using a form

Hallo,

 

I want to patch a item with attachments from PowerApps to sharepoint list.

I don't use a form because the user has diffrent ways to add information(They have the option to use dropdown or enter it as text).

Depending on what is selected or filled in, the appropriate if branch is entered and the appropriate patch is executed.

Therefore I did not use forms.

Now I have extracted an attachment field from a form and used it to show the taken images(The images are added through a collection) , which i want to patch together with the other information as an item in the sharepointlist.

My question is now, how can I add this images as an attachment? I know you can use a flow, because it seems that adding attachments directly without forms is not possible , but i don't know how best to implement it in my patch.

 

Thanks

2 REPLIES 2
C-Papa
Super User
Super User

Hi, i think this can only be done using a flow. As a work around, create a form but only add the attachment and title card. change the default of the title to what ever the title is in the patch function and change it's visible property to false.  

 

This leaves you with the attachment control in a form.

 

change your patch function by wrapping it in a set() e.g. Set(Var_My_Patch, Patch([Your Patch Function]))

 

then after you can patch the attachments by using Patch([DataSource],{ID:Var_My_Patch.ID},Form1.Updates) where Form1 is your form name. this should patch the attachments to the item created / modified in the patch

MaxF
Frequent Visitor

@C-Papa

Yes this is is a nice idea. I did it like you said.

The problem is, i can update the title, the name or everything else but the attachment does not want to add(respectively will not be displayed in sharepoint). It doesn't matter if it is the images from the collection that I have entered as an item in the attachment field or a .txt file uploaded from my local file system.

 

Edit: It works for an image from my lokal file system. But the images of my collection are still not added.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,372)