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 / Update Collection with...
Power Apps
Answered

Update Collection with the value entered in a dialogbox

(0) ShareShare
ReportReport
Posted on by 109

Hi,

I have a blank horizontal gallery with two fields i.e TextInput and Button, and the Gallery's Item property is a Collection.  (refer below image) The Collection has 2 columns HoursWorked and Notes.

 

Issue1.png

 

When the User Clicks on the "Add Notes" button, a Dialog box is displayed where the User can enter Notes(refer pic below)

issue2.png

After the User Clicks OK, The note should be updated in the Collection. So the issue is I am not able to update the Notes in the collection. 

 

Thanks.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,319 Most Valuable Professional on at

    Hi @MJK ,

    Try

    Patch(
     YourCollectionName,
     ThisItem,
     {Notes:YourNotesControlName.Text}
    )

     

    Please click Accept as solution 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 Thumbs Up.

     

  • MJK Profile Picture
    109 on at

    Thanks @WarrenBelz ,

     

    But where should this code be written?

  • Verified answer
    WarrenBelz Profile Picture
    156,319 Most Valuable Professional on at

    @MJK ,

    On the OK button I can see below your notes, but I just realised that it is outside the gallery, so ThisItem will not work.

    Instead, try YourGalleryName.Selected.

    Patch(
     YourCollectionName,
     YourGalleryName.Selected,
     {Notes:YourNotesControlName.Text}
    )

     

    Please click Accept as solution 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 Thumbs Up.

  • WarrenBelz Profile Picture
    156,319 Most Valuable Professional on at

    Hi @MJK ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution 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 Thumbs Up.

  • MJK Profile Picture
    109 on at

    Hi @WarrenBelz ,

     

    The code works perfectly fine!

     

    Just one question, if I use Update instead of Patch, I get an error - "Update has some invalid arguments". Why is that?

  • WarrenBelz Profile Picture
    156,319 Most Valuable Professional on at

    Hi @MJK ,

    You could use UpdateIf with the ID from the gallery

    UpdateIf(
     YourCollectionName,
     ID=YourGalleryName.Selected.ID,
     {Notes:YourNotesControlName.Text}
    )

    I have not used Update for a while, but it involves replacing a record with  another one.

     

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
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard