I would like to populate the attachment field in an edit form with a previously uploaded attachment. I've gotten most of the way there by using the following on the OnAddFile Action of the Attachement Data Card:
Then, in the items action of the Attachment data card, I populate it with this code:
so that if the user wants to keep the receipt for the next entry, it will populate DataCardValue9.items with the collection table as below.
When I try to open the file, however, if gives the above "Couldn't download the file" error. When I submit the form, the rest of the data is saved to the Sharepoint list but not the attachment.
There was one other thread by @HN and answered by @v-monli-msft on this last year saying this couldn't be done, but I was hoping that perhaps there was movement forward and I just need to get my code right.