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 Apps / Error- Patch Function ...
Power Apps
Suggested Answer

Error- Patch Function Not Saving

(1) ShareShare
ReportReport
Posted on by 10
Hello!

Currently building a checklist with a gallery consisting of text, dropdown inputs and textbox inputs, and trying to get each to save with the users input, with using data from a sharepoint list, However I'm currently facing this error:
 

Gallery Code:

Onselect:
 
ForAll(Gallery3_1.AllItems,
Collect(
    TestCol,
    {
        answersc: inpanswers.Selected,
        evidencesc: inpevd.Text
    }
)
)


Input Code:
Onchange:

 
Patch(TestCol, ThisItem, {answersc: Self.Selected.Value})
 
Patch(TestCol, ThisItem, {evidencesc: Self.Text })

Been stuck on this for a while so any help would be appreciated! :)

 
 
Categories:
  • Suggested answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at
    Hi,
     
    Looks like your Patch is not correct. 
    When collection answersc you type is a record. 
    So when you patch it needs to match the same type. 
     
    Try this with the Patch:
    Patch(TestCol, ThisItem, {answersc: Self.Selected})
     
  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at
    The first explanation suggests that the Items of the Gallery are not exactly the same as the fields in the Collection, so ThisItem does not exactly match the target record. The other errors suggest that answersc is a Choice column. Assuming that you have a unique identifier in the record (I will use ID as an example), this may work
    Patch(
       TestCol, 
       LookUp(
          TestCol,
          ID = ThisItem.ID
       ),
       {answersc: Self.Selected}
    )
    
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • JP-24071314-0 Profile Picture
    10 on at
    Thank you @WarrenBelz! The explanation definitely helped, I do have ID as a column in the sharepoint list, but not in the record itself, how would I establish a unique ID for each entry/input in the collection?

    thank you!!

    edit: currently getting this error:


  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at
    You need to use whichever field is the unique identifier (no two records have the same value) in your table.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard