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