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 / New record using value...
Power Apps
Answered

New record using values from old record

(0) ShareShare
ReportReport
Posted on by 12

I have a sharepoint list which I am building my powerapp on. I have a need to use all the data from an old record (which I get to using gallery and then detail screen), and then I remove 1 or 2 fields like name and attachements. Everything works so far.

 

What I have done so far is use the "edit" button but set the form mode to new. But this still overwrites the existing record.

 

There is a copy button on the detail screen with the following on select formula:

 

 

 

EditForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None);EditForm1.Mode = New;

 

 

 

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

    Hi @fa2 ,

    The last command does nothing - you need

    NewForm(EditForm1);
    Navigate(
     EditScreen1, 
     ScreenTransition.None
    )

     

    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.

    Visit my blog Practical Power Apps

  • fa2 Profile Picture
    12 on at

    Hi, @WarrenBelz 

    The command you have sent just creates a new blank form. I need that new blank form with the values from an existing record.

     

    Why does the last command do nothing? Could you please explain? I can see that the form has been set to new but that doesn't create a "new" record

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

    @fa2 ,

    You cannot change a Form Mode like that - you need NewForm(FormName) for it to create a new record. If you want existing values as Defaults, this gets a little complex. The best way would be to set a Record Variable (for instance on the OnSelect of the Gallery you are choosing it from)

    Set(gblRecord,ThisItem)

    then on the Default of each field you want to retain

    If(
     FormName.Mode = FormMode.New,
     gblRecord.TheFieldName,
     WhateverItIsNow
    )

     

    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.

    Visit my blog Practical Power Apps

  • Verified answer
    fa2 Profile Picture
    12 on at

    I have managed to achieve it using a combination of set and patch. So what I did was similar to before and the key but was making the ID blank which then saves as a new record. In practice it works like this:

     

    Set(curRecord,ResultsGallery.Selected);EditForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None);

     

    Then in the EditFrom items property I added the following:

     

    Patch(curRecord, {ID:Blank()})

     

    Upon clicking submit this creates a new record

  • SenoirB Profile Picture
    72 on at

    Hello, I was able to successfully use this method on my first app.

     

    Items property of the Form:

    Patch(curRecord, {ID:Blank()})

    But on my second app I keep getting an error. "Network error when using patch function: The specified column is generated by the server and can't be specified." The ID column is the issue. Anyone with any idea why it works on one and not the other? 

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

    @SenoirB ,

    The example was patching a collection - you cannot patch a blank ID to a SharePoint list. This is an old closed post - if you have further issues, please post a new thread and detail what it is you are trying to do.

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

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard