cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lp939
Level: Powered On

Need to add Attachment to a PATCH to a SharePoint List

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! :-)

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Need to add Attachment to a PATCH to a SharePoint List

Hi @Lp939,

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:3.JPG

 4.JPG

 

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
12 REPLIES 12
Community Support Team
Community Support Team

Re: Need to add Attachment to a PATCH to a SharePoint List

Hi @Lp939,

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:3.JPG

 4.JPG

 

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Lp939
Level: Powered On

Re: Need to add Attachment to a PATCH to a SharePoint List

@v-xida-msft This worked like a charm!!!! Thank you very much!!! Just exactly what I needed!

Community Support Team
Community Support Team

Re: Need to add Attachment to a PATCH to a SharePoint List

Hi @Lp939,

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Need to add Attachment to a PATCH to a SharePoint List

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:

image.png

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!

Super User
Super User

Re: Need to add Attachment to a PATCH to a SharePoint List

Anyone? I cannot get PowerApps to Patch attachments INTO an existing record. 

PytByt
Level: Powered On

Re: Need to add Attachment to a PATCH to a SharePoint List


@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:

image.png

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!


i have the same problem here... 

 

is there no help anymore about this topic?

Super User
Super User

Re: Need to add Attachment to a PATCH to a SharePoint List

bump @v-xida-msft 

Varsha2005in
Level: Powered On

Re: Need to add Attachment to a PATCH to a SharePoint List

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.



 

PytByt
Level: Powered On

Re: Need to add Attachment to a PATCH to a SharePoint List


@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... Smiley Sad 

 

We need this.

 

Cheers,

pytbyt