Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

using existing record to create


I am junior for using powerapps. I have below question and hope to get help


the record is already in the database. however, I would like to edit this record and then save as a new transaction. How can i do that? Please kindly help

Dual Super User
Dual Super User

Re: using existing record to create

Hi @ArthurLin 


If I understood this correctly, you want to create a new record by using the values from an existing one.
For this, you can create an Edit Form, select the data source, and set the "Item" property to point to specific record using expression:
LookUp(DataSourceName, Title = "Test")
This will get the first record matching the criteria.
Now, you can create a button to save this record to datasource.
Button -> OnSelect -> Patch(DataSourceName,Defaults(DataSourceName),{Title:DataCardValue2.Text,Choice: DataCardValue5.Selected.Value})
Here, DataSourceName is the name of data source. Title and Choice are the name of columns, while DataCardValue2/DataCardValue5 refers to the name of controls.
In you need specifics for the formula, please share more details about the logical implementation.


Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Level 8

Re: using existing record to create

Hi @ArthurLin 

As @yashag2255 already pointed out, you can use Patch to create copies of records, using Defaults for the BaseRecord argument of Patch.
You can also use your original record (that you want to copy) as ChangeRecord.
This might be easier than explicitly listing every control in the form, and making sure the form has all necessary controls, in order to get a full-enough copy.

If you use your original record in this way as ChangeRecord, you might have to drop the read-only columns (only for the use in Patch as ChangeRecord) which get set automatically by the Database/Dynamics/CDS (e.g. guid fields, createdby, createdon...).
Otherwise PowerApps (i.e. the CDS connector) might yield an error on your actual attempts to use Patch.
Those kinds of errors won't appear in the App Checker before actual execution.

With CDS/Dynamics, you can also replace Defaults with a record containing only a Blank() guid field to force the creation of a new record instead of overwriting an old one.
Here's a more explicit version of what I'm trying to convey:

        GuidField: Blank()

Good luck,

Community Support Team
Community Support Team

Re: using existing record to create

Hi @ArthurLin ,

How do you edit existing record of your data source within your app? Using Edit form?


I assume that you use Edit form to edit an existing record in your data source within your app, based on the needs that you mentioned, I think the Patch function could achieve your needs.


I have made a test on my side, please take a try with the following workaround:

Within your Edit screen (which contains Edit form), add a Button called "Existing to New", set the OnSelect property to following:

           EditForm1.Updates               /* <-- EditForm1 represents the Edit form in your app to edit the existing record */

Please take a try with above solution, check if the issue is solved.

After you edit your existing record within the Edit form, click the "Existing to New" button, then it would save the modified existing record into your data source as New record.


In addition, you could also consider set the OnSelect proeprty of the "Submit" button within your Edit form to following:

Patch(                    /* <-- Add this formula */
           EditForm1.Updates               /* <-- EditForm1 represents the Edit form in your app to edit the existing record */

When you press the Submit button, it would update existing record in your data source, and create a new record using the modified existing record at the same time.


More details about the Patch function, please check the following article:

Patch function


Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level 8

Re: using existing record to create

Hello @v-xida-msft 

Does using Form.Updates actually work for creating proper copies?
I was under the impression that Form.Updates only produced something like a "diff" record with changes.
So, as far as I understand, this won't be creating a full copy unless you have every field in the form and actually change every field.
Please, do let me know whether my understanding is wrong.

Thank you,

Helpful resources

New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,722)