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 / Copy/Duplicate records...
Power Apps
Answered

Copy/Duplicate records Canvas App

(0) ShareShare
ReportReport
Posted on by 50

I am wanting to copy the records for the previous day into the currently selected day. The current patch statement to create a record is below, I cannot figure out how to reference the records in the prior date and copy to new date when the copy icon is selected. Does anyone have any suggestions / pointers?

 

 

This is comprised of a horizontal and nested vertical gallery.

 

Horizontal Gallery: Date_Gallery

Nested Vertical Gallery: Capacity_Detail_Gallery

 

When the + Icon is selected it creates a new record for selected values from the galleries in the image:

 

Patch(

    'CAPACITY DETAIL TRACKERS',

    Defaults('CAPACITY DETAIL TRACKERS'),

    {'Capacity Main LookUp': Project_List_Gallery.Selected},

    {'Capacity Date LookUp': Date_Gallery.Selected},

    {'Capacity Resource LookUp':Resource_Gallery.Selected},

    {'Capacity Value': 'Capacity Value (CAPACITY DETAIL TRACKERS)'.'0'}

);

Notify(First(Errors('CAPACITY DETAIL TRACKERS')).Message);

686B1768-1E3B-4490-8050-0A3A8137CDEF.png
D0DF7E05-9A37-4A91-875C-44BE93FE6962.png
Categories:
I have the same question (0)
  • Verified answer
    JayMagness Profile Picture
    1,663 on at

    Like most things in technology there are a million ways to solve this but I like to take the easy way out. 

     

    I see so many people writing miles of code but Powerapps does not need this. 

     

    add a gallery and have it filter to the day before and whatever else you need to filter to get to the 1 previous days record.

    then add a view form and ad the item in the form to get the record that is select form the previous record.

     

    then finally I would make the new days form filed default values to each in the form that has the selected data. 

     

    the make the gallery and the view form invisible.

     

    This is all good because you may not want the previous days data but the data that could be two days before because of Holidays and weekends. this just how I would do it.

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 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard