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 / Need help with Gallery...
Power Apps
Unanswered

Need help with Gallery and forms

(0) ShareShare
ReportReport
Posted on by 88

Hi,

  This is my scenario. I have created a SharePoint list called "Camp checkin" with columns child name, Parent name, arrival time and pickup time. In Power apps inside one of my screens have inserted a gallery and edit form both connected to the SharePoint list "camp checkin". The item property of the edit form is set to gallery.selected. I have inserted 2 buttons in the screen one for arrival and one for pickup. Inside OnSelect property of the arrival button                                                                  

Sheela1_0-1690125181426.png

If I click the arrive button it's creating new entry in the SharePoint list with the child name, Parent name and current date and time for arrival. up to this point it's working fine. I wrote the  same function for Pick up button and hence If I click the Pick up button it's creating one more entry with child name, parent name and pick-up time. but I don't want to create new record for pick-up. I want to add the pick-up time for the corresponding arrival time. I don't know what function to write inside pickup button.

Sheela1_1-1690125677142.png

Sheela1_2-1690125718169.png

Also In my gallery I don't want to repeat the child names, Gallery should show distinct values based on child name from SharePoint list. Is it possible? Any help would really be great. Thanks in advance.

Categories:
  • asdasdasdasdasd Profile Picture
    72 on at

    Hi There,

    Using patch(datasource,defaults(datasource),{items}) will create a new records.

    What you want to do, to avoid duplicate records is, 

    Patch(datasource, Lookup(datasource, ID = gallery.selected.ID, {Update values}). This will patch values to update an existing record.



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 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard