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 / Patch Collection in a ...
Power Apps
Answered

Patch Collection in a Gallery via Text Input

(1) ShareShare
ReportReport
Posted on by 39
Hello Supporters,
 
I have a strange behavior in patching a collection.  
 
OnChange / OnSelect Formula should patching the textinput to 'ThisItem'. Instead the 1st Row is updated. 
 
 
 
 
Any thoughts on this?
 
Old Thread without solution:
 
Thanks, 
Alex
 
 
Categories:
I have the same question (0)
  • Suggested answer
    jthewissen Profile Picture
    28 on at
    Hi,
     
    The patch function probably sees two possible records that can be updated and because of this it will default to the first record.
    You probably need to replace ThisItem in the patch with the following:

    first(filter(ColEbeneW1Antworten, ID = ThisItem.ID)) < This will select the correct record in the collection by using a unique identifier, like ID.

    Hope this helps.

    Kind Regards,

    Jeannot Thewissen
  • alexaso Profile Picture
    39 on at
    Still not working. I even entered the explicit ID
     
    Patch(colEbeneW1Antworten;First(Filter(colEbeneW1Antworten; ID = 1))   ;{Grund: W1Antwort1_9.Text  });;
     
     
  • Suggested answer
    ANB Profile Picture
    7,252 Super User 2026 Season 1 on at
    Hi,
     
    Try LookUp instead:
    Patch(colEbeneW1Antworten;LookUp(colEbeneW1Antworten; ID = 1);{Grund: W1Antwort1_9.Text  });;
     
    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.
     
    Thanks,
    ANB
  • Verified answer
    alexaso Profile Picture
    39 on at
    thanks for you support! It was a bug with the textinput field. I have created a new one and now the patch with ThisItem works
     
    Patch(colEbeneW1Antworten;ThisItem;{Grund: W1Antwort1_9.Text  });;Patch(Warum5xCollection;Problemanalyse.Selected;{Status:"Update"})

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard