cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
maverick17
Advocate III
Advocate III

How to use PATCH to save an attachment to CDS Entity??

Does anyone know how to use PATCH to save an attachement to CDS? I was able to make this work with SharePoint in the past but having issues with CDS.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuxima-msft
Community Support
Community Support

Hi @maverick17 

 

If you want to add a attachment to  use 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:

1.DataSource:

Entity.PNG

2.App Test:

Button1.OnSelect=Patch('2019attachmenttests',Defaults('2019attachmenttests'),{Name:DataCardValue7.Text},EditForm1.Updates)

(controls' names and datasource on my side, you can change those to yours on your side)

Patch2CDS.PNG

usepatch.gif

 

Hope this could be helpful.

 

Best Regards.

Yumia

View solution in original post

1 REPLY 1
v-yuxima-msft
Community Support
Community Support

Hi @maverick17 

 

If you want to add a attachment to  use 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:

1.DataSource:

Entity.PNG

2.App Test:

Button1.OnSelect=Patch('2019attachmenttests',Defaults('2019attachmenttests'),{Name:DataCardValue7.Text},EditForm1.Updates)

(controls' names and datasource on my side, you can change those to yours on your side)

Patch2CDS.PNG

usepatch.gif

 

Hope this could be helpful.

 

Best Regards.

Yumia

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,059)