Need help with the pattern here...
Would really love some clarity here. I feel like there are 100 ways to do this and they keep evolving! @paul_culmsee
Hi @ericonline ,
1. You can make the list of attachments show in the edit form screen like this:
Insert a Gallery control, set its Items property to:
(I'm using the auto-generated app created from Start from data > SharePoint.)
2. For Attachments control, upload and delete functionality work only inside a form. The Attachment control appears disabled when in Edit mode and not inside a form. To save file additions and deletions, the app user must save the form. Because of this limitation, the Attachment control isn't available from the Insert tab but appears in the form when the Attachment form field is enabled in a SharePoint or Common Data Service form.
3. So far, you cannot use an Add Picture control to upload images from PowerApps to SharePoint directly. The only workaround so far is to use PowerApps + Microsoft Flow solution.
Below are some blogs that might help:
On my website I have blogged extensively insofar as different techniques you can use to render images with your PowerApps applications.
Whilst I don't have a specific blog pertaining to your requirements I can tell you that during some of the testing I have done I have successfully used the attachments control on a form "aka your create new use case" which enables you to take photos on mobile devices and / or upload existing photos stored on your phone or desktop web client app as attachments to a list item.
When the list item with the attachments is then saved to a list in SharePoint I implemented a Flow that triggers on insert and subsequently transverses through each of the list item attachments as they are uploaded and copies each of the attachments to a SharePoint Document Library / Site Assets library. You could alternatively instatiate the Flow directly from PowerApps after saving the list item for a more responsive solution.
Importantly I added a column on that library to use as a foreign key in order to corrolate which images were related to each list item created (e.g. ID).
As the Flow runs and copies each of the list items Attachments to the Document Library I equally delete that attachment from the list item as it is no longer of relevance.
As soon as the images have to moved from being an attachment to a list item to being an actual file stored in a SharePoint Document Library inclusive of the related key property to the corrosponding list item, you can then depict those images in your app and levage standard SharePoint functions such as Remove should you wish to delete the image from SharePoint and the relevant list item.
Once the images are stored in a SharePoint Document Library, I have blogged on a number of techniques you can use to render those images within you app such as this one:
Featuring samples like Return to the Workplace and Emergency Response Applications
We're excited to announce our first cross-community 'Can You Solve These?' challenge!
Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.
We are excited for the next Super User season.
Features releasing from October 2020 through March 2021