cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helpful
Level 8

Add file to SharePoint library associated with a CDS Entity?

Hi All,

I have a custom entity, "Expense", in CDS with SharePoint document storage configured.  It is working such that for each new record a folder is created in SharePoint that looks like:  "Expense1_33d9a25f-ee34-4c7b-a818-7821ea07f8fc"

Now I want to create a canvas app that allows a user to create a new Expense, take a picture of their receipt and upload it to the record's associated SharePoint folder.  Ideally, I would use the "Add Picture" control to make use of mobile device capabilities.  I have reviewed a lot of threads/videos where something like this is attempted, but the number of alternative methods leaves me confused.

The "Documents" table on a CDS entity

In my canvas app, if I examine an individual record in Expenses data source there is a property called "Documents" (other entities that are not configured with SharePoint doc storage are missing this property), however, the formula explorer states that "We didn't find any data" when I try to work with it even though I know the record I am looking at has an associated folder in SharePoint containing a file.  If I try to write code agaisnt it appears to try to continusouly fetch data and never gets anything.

Documents appears to have the following properties (and others) that suggest it should behave like a SP Doc Library:

  • 'Document Location Type'
  • 'Is Checked Out'
  • 'Is Folder'

Other things I have tried include adding the Expense doc library as a data source and then finding the folder using the ID of the expense (which works fine), but then I'm not sure how to add the image file to that folder.

Would love the help of the big brains out there!

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Add file to SharePoint library associated with a CDS Entity?

Hi @Helpful 

 

If you use a Add picture control to capture the picture (which would be uploaded to the SP image library) within your app (PowerApps Mobile App), please check and see if the following blog would help in your scenario:

http://repointtechnologies.com/saving-images-from-powerapps-to-sharepoint/

 

Hope this could be helpful.

 

Best Regards.

Yumia

 

Helpful
Level 8

Re: Add file to SharePoint library associated with a CDS Entity?

Thanks, @v-yuxima-msft.  At first glance, this might achieve what I'm looking for with some unfortunate workarounds.  Looks like the SP library will need a specific column added.  I may have misread it, but I was hoping to not have to tweak the SharePoint library after it's created.  I'll take a deeper look.  Thanks!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 181 members 4,483 guests
Recent signins:
Please welcome our newest community members: