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.
Hi @Anonymous,
Could you please share a bit more about your scenario?
Do you want to add a attachment to a SP list item using Patch function?
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 your needs in PowerApps currently.
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
As an alternative solution, 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:
Set the OnSelect property of the "Submit" button to following formula:
Patch(
'20180921_case2', /* <-- My SP List */
Defaults('20180921_case2'),
{Title:"PowerApps3",TaskName:"Task3",NoOpportunity:true,NoOpp_PostSales_x0020_:true},
EditForm1.Updates
)
On your side, you should type following formula:
Patch(
'YourSPList',
Defaults('YourSPList'),
{
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.
Please also check and see if the following thread would help in your scenario:
https://powerusers.microsoft.com/t5/General-Discussion/Patch-Attachments/td-p/98121
Best regards,
Kris
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!
Hi @Anonymous,
Could you please share a bit more about your scenario?
Do you want to add a attachment to a SP list item using Patch function?
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 your needs in PowerApps currently.
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
As an alternative solution, 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:
Set the OnSelect property of the "Submit" button to following formula:
Patch(
'20180921_case2', /* <-- My SP List */
Defaults('20180921_case2'),
{Title:"PowerApps3",TaskName:"Task3",NoOpportunity:true,NoOpp_PostSales_x0020_:true},
EditForm1.Updates
)
On your side, you should type following formula:
Patch(
'YourSPList',
Defaults('YourSPList'),
{
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.
Please also check and see if the following thread would help in your scenario:
https://powerusers.microsoft.com/t5/General-Discussion/Patch-Attachments/td-p/98121
Best regards,
Kris
@v-xida-msft This worked like a charm!!!! Thank you very much!!! Just exactly what I needed!
Hi @Anonymous,
Have you solved your problem?
If you have solved your problem, please click "Accept as Solution" on the reply that contains the solution so that this thread will be marked for other users to easily identify.
Best regards,
Kris
Hi @v-xida-msft ,
Has this functionality changed since you posted this solution? I cannot get a single DataCard-Form to Patch into an existing SP record.
Example:
Single DataCard Form with Attachments:
Form: Data Source
MY_SP_LIST
DataCard: Update
attachmentControl.Attachments
Save Button: OnSelect
Patch( LookUp(MY_SP_LIST, eventGUID = varEventGUID), { Attachments: attachmentControl.Attachments } ); ViewForm(frmEdit)
Results: The form switches to ViewMode and thats it, no Patch back to DataSource.
Any ideas?
Thank you!
Anyone? I cannot get PowerApps to Patch attachments INTO an existing record.
@ericonline wrote:Hi @v-xida-msft ,
Has this functionality changed since you posted this solution? I cannot get a single DataCard-Form to Patch into an existing SP record.
Example:
Single DataCard Form with Attachments:
Form: Data Source
MY_SP_LISTDataCard: Update
attachmentControl.AttachmentsSave Button: OnSelect
Patch( LookUp(MY_SP_LIST, eventGUID = varEventGUID), { Attachments: attachmentControl.Attachments } ); ViewForm(frmEdit)Results: The form switches to ViewMode and thats it, no Patch back to DataSource.
Any ideas?Thank you!
i have the same problem here...
is there no help anymore about this topic?
Has anyone got a solution for this. I am trying to attach a image from my powerapps to Sharepoint List. I can add image but it is not saving to the Sharepoint List. Is there are any work around.
@Varsha2005in wrote:Has anyone got a solution for this. I am trying to attach a image from my powerapps to Sharepoint List. I can add image but it is not saving to the Sharepoint List. Is there are any work around.
I have it too... 😞
We need this.
Cheers,
pytbyt
User | Count |
---|---|
125 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
217 | |
181 | |
140 | |
97 | |
83 |