Showing results for 
Search instead for 
Did you mean: 
Resolver III
Resolver III

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!


Community Support
Community Support

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:


Hope this could be helpful.


Best Regards.



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

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (41,913)