web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / polling ideas - "clone...
Power Apps
Unanswered

polling ideas - "clone project" - use form, or patch directly

(0) ShareShare
ReportReport
Posted on by

I have an app which records projects. These are displayed in a gallery, together with a corresponding form in one screen.

The users would like a function to duplicate a project into a new record.

I'm thinking that it would be easiest if the duplicated project could be displayed in a form so users can verify/change data before saving the new record. Using the same form on the same screen however, seems like it would require using a collection as well as extensive modification of the default/defautselecteditems fields of the form (to fill the data from the collection).

Is there a better way of displaying the new record while duplicating?

Thanks!

Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @BertP ,
    Can you please share the datasource you are using in your app.
    You can try using below steps to check if this works:
    1. Add EditForm instead of new form besides gallery control.
    2. In Item property of form, use LookUp(DataSourceName, ID = GalleryName.Selected.ID)
    3. Add a button to create duplicate entry. In OnSelect property of the button, use: Patch(DataSourceName, Defaults(DataSourceName), EditFormName.Updates)


  • BertP Profile Picture
    on at

    Thanks @NandiniBhagya20 !

     

    Datasource is Dataverse...

     

    OK, so use patch to duplicate the record first, then edit after.

     

    My only hesitation is that my gallery has filtering/sorting applied, with the result that the default property of the gallery never displays the last submitted record, even though it is set to form.lastsubmit. So users always have to navigate to the last submitted record instead of having it pre-selected for them. Users therefore would have the extra step of going back to the gallery to select the newly duplicated record before they could view/edit it...

     

    I am still toying with the alternate idea of using a new form and pre-populating the fields with the contents of a collection (using the default/defaultselecteditem properties of the form). It just sounds like a nightmare to implement though...

     

    Are there any alternate ways to duplicate a form directly into a new or edit form and have it display the duplicated content without needing first to re-select the record from the gallery?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard