web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / {Attachments:} Field I...
Power Pages
Unanswered

{Attachments:} Field Id is required - Error patching attachments to Sharepoint

(1) ShareShare
ReportReport
Posted on by 220
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 
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 53

#2
DP_Prabh Profile Picture

DP_Prabh 49

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 28 Most Valuable Professional

Last 30 days Overall leaderboard