Hi,
I have a gallery that is made of a collection of questions, called colInspectionQuestions.
When I select the item in the gallery I browse to the edit form screen to add additional information and photos for the item selected.
To add photos to the item, I click the camera icon and I navigate to the photo screen. My photos are stored in a collection called colCameraImage.
When I go back to the form, I can see my photos in the attachments data card but I am unable to save this record to the SharePoint list called SubmittedQuestions. I receive an error.
Here is my camera photo collection
Screen "ScrAddPhoto"
//Creating variable when picture is taken - Onselect of Camera code
//Manually creating collection and using variable to name image.
Set(
varImageName,
GUID ()
);
Collect(
colCameraImage,
{
DisplayName: varImageName & ".jpg",
ID: varImageName & ".jpg",
Value: Camera1.Photo
}
);
Data in collection colCameraImage
I followed instructions in this link to Save Power App Camera Images as Attachment to SharePoint List.
This is my form, and the attachment card items default and update are set to the collection - colCameraImages.
The datasource for Editform3 is SubmittedChecklist.
This is my SAVE to SharePoint Code:
Patch(
SubmittedCheckList,
Defaults(SubmittedCheckList),
{
Title: varSelectChecklist,
Question: varIDRecord.Title,
QID: varIDRecord.ID,
Assignee: ComboBox2.Selected.DisplayName,
SiteID: varLocation,
InspectDate: Today(),
NeedsAttention: DataCardValue7.Text,
Attachments:DataCardValue14
},
EditForm3.Updates
);
I look forward to hearing from you. Thanks for your support.
Thanks