Hello guys,
In my App I create items for sharepoint list (Name, email ,...) and also need to attach sometimes files specific to the item.
I read about how to upload files to sharepoint via Flow (Power Apps Easiest Way To Upload Files To A SharePoint Document Library (matthewdevaney.com))
The question is, how do I customize this for my needs?
I want to create the item, maybe or maybe not attach a related files and save it to the list. If I want to edit the entry later I want to display the file also (no need to edit the file ( except deleting)). At the moment I don't use a form, instead I use custom inputs and Patch them
Example use:
Safe a Person to sharepoint with
- Name
- employee contract
Solved! Go to Solution.
Hi @RiccoHipp :
Do want to add a attachment to a SP list item using Patch function directly?
If so, 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\Add an edit form(Form3)
2\Add a button
OnSelect:
Patch(
'List A',/*'List A' is my data source*/
First('List A'),/*Modify the first record in the data source*/
{Title: "1"},
Form3.Updates
)
On your side, you should type following formula:
Patch(
'YourSPList',
'Your specified record',
{
Column1:TextInput1.Text,
Column2:TextInput2.Text,
Column3:TextInput3.Text,
...,
ColumnN:TextInputN.Text
},
EditForm1.Updates
)
Note: The Editform1 represents the Edit form control within your app, which only display the Attachments field.
I think these links will help you a lot:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Saving-attachments-using-Patch/td-p/277984
Best Rergards,
Bof
Hi @RiccoHipp :
Do want to add a attachment to a SP list item using Patch function directly?
If so, 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\Add an edit form(Form3)
2\Add a button
OnSelect:
Patch(
'List A',/*'List A' is my data source*/
First('List A'),/*Modify the first record in the data source*/
{Title: "1"},
Form3.Updates
)
On your side, you should type following formula:
Patch(
'YourSPList',
'Your specified record',
{
Column1:TextInput1.Text,
Column2:TextInput2.Text,
Column3:TextInput3.Text,
...,
ColumnN:TextInputN.Text
},
EditForm1.Updates
)
Note: The Editform1 represents the Edit form control within your app, which only display the Attachments field.
I think these links will help you a lot:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Saving-attachments-using-Patch/td-p/277984
Best Rergards,
Bof
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
186 | |
55 | |
42 | |
36 | |
33 |
User | Count |
---|---|
258 | |
78 | |
74 | |
71 | |
68 |