Have you wanted to save offline data in SharePoint, but also needed to include attachments. Here is a way to save, retreive and upload this data using only Power Apps.
Firstly you need a normal Edit Form (classic example here) with an attachment control (example named acAttachments). Data is entered as usual - this process addresses new records only
Now you need a Gallery (galAttachments - which you can hide) - with the Items property
In the gallery are two controls - a
Text Label lblAttachName with the
Text property
and an
Image Control imgAttachContent with the
Image property
The Image control is needed to resolve the attachment content to the actual file content rather than the format an attachment control uses to reference them.
When you are saving the offline form, it is to a collection - example below
colOffline. Add your other fields as required. This example first tests for a connection and submits the form if one exists - you can call the local offline file whatever you want
Now when you need to upload all of the offline records to your SharePont list when back online - at App OnStart
Then to upload the saved files
You should find all the offline records complete with any attachments now in your SharePoint list.
It is also good to have a label on the screen with the
Textand the
VisibleYou could also have the upload button having the same Visible