Hello Community,
I have a form App - I do not use the EditForm function or having the PowerApps to create the Form for me. I built the entire form from scratch, where each individual dropdown box, input box or combo box are connected to SharePoint List/column one by one and the Submit button of the form, I use the "Patch" function.
Is there anyways I can use patch function with the submit button I made to patch all the information along with the attachments into the SharePoint?
Any advice is appreciated, thank you in advance.
Solved! Go to Solution.
@v-qiaqi-msftthis worked perfectly.
I called Form.Updates without passing any parameters into patch on a New Form, the entry was created and the attachments were uploaded to the SharePoint list. Thanks a ton.
Here is my sample code.
Patch(
Workflows,
Defaults(Workflows),
{},
//Required to add attachments
StartNewForm.Updates;
)
Patch does not support attachments.
Here is a video of all SP column types and Patch - https://www.youtube.com/watch?v=g9ChYuTdNd4
To add attachments I have a couple of vlogs around this
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks,
Reza Dorrani, MVP
YouTube
Twitter
Hi@lliu_western,
Based on the issue that you mentioned, do you want to patch attachments to SharePoint list?
Could you please share more about your scenario and your form configuration? Please provide screenshots about a form you created from scratch which doesn’t use EditForm() or Form control within PowerApps.
As we know, we can patch attachments to the SP list through Attachment control within Edit Form from PowerApps while we can’t achieve this you want to patch it directly.
If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas
Since you create your form from scratch, you can consider adding the Attachment field from the SP list data source.
Set the OnSelect property of the Button as below:
Patch(
‘SPlist’,
Defaults('SPlist'),
{Title: TextInput1.Text
…},
EditForm1.Updates
)
Best Regards,
Qi
Hi@lliu_western,
Have you solved your issue?
If it solves your request, Mark it as a Solution to enable other users to find it.
Best Regards,
Qi
@v-qiaqi-msftthis worked perfectly.
I called Form.Updates without passing any parameters into patch on a New Form, the entry was created and the attachments were uploaded to the SharePoint list. Thanks a ton.
Here is my sample code.
Patch(
Workflows,
Defaults(Workflows),
{},
//Required to add attachments
StartNewForm.Updates;
)
Hi@lliu_western,
Glad I could help.
If it solves your request, Mark it as a Solution to enable other users to find it.
Best Regards,
Qi
Hi,
Can Anyone please explain how to remove attachment from the sharepoint list in powerapps.
I tried below patch function, Which is only attaching newly added file but it is not removing the file from powerapps.
Thanks,
Have you tried with Microsoft Graph?
very helpful!!! Searched for a long time to find a way to add in data from different data sources to a single sharepoint list along with an attachment... This was the by far the easiest way to do both in a single submission button. Thank you!
User | Count |
---|---|
158 | |
91 | |
67 | |
63 | |
63 |
User | Count |
---|---|
213 | |
157 | |
96 | |
86 | |
76 |