Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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
 
 
  • Verified answer
    alexaso Profile Picture
    39 on at
    Patch Collection in a Gallery via Text Input
    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"})
  • Suggested answer
    ANB Profile Picture
    7,075 Super User 2025 Season 1 on at
    Patch Collection in a Gallery via Text Input
    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
  • alexaso Profile Picture
    39 on at
    Patch Collection in a Gallery via Text Input
    Still not working. I even entered the explicit ID
     
    Patch(colEbeneW1Antworten;First(Filter(colEbeneW1Antworten; ID = 1))   ;{Grund: W1Antwort1_9.Text  });;
     
     
  • Suggested answer
    jthewissen Profile Picture
    26 on at
    Patch Collection in a Gallery via Text Input
    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

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard