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 / Save and copy button i...
Power Apps
Unanswered

Save and copy button in powerapps

(0) ShareShare
ReportReport
Posted on by 125

Hello,

I'm trying to create a function for a save and copy button in Powerapps, where the user can fill in attributes on a form and OnSelect of the button the attributes will save to the SP list, the form will re-fresh but keep all the attributes filled except for the title (Serial number).  A new serial number can be added and OnSelect of the button it will create a new entry on the SP list. 

Currently my code is just overwriting the original entry with a new serial number.

Thanks

 

Categories:
I have the same question (0)
  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    To save form to SharePoint list use:

    Submitform(formname);

     

    To load data of last submitted you can use:

    Formname.LastSubmit

    I would try and do this by adding a line to the OnSelect property of the button after SubmitForm that saves Form.LastSubmit in a (context) variable. If you then adjust the Default properties of the datacards in the form to first check if the variable has a value.

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    You will need a NewForm on the OnSuccess

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi @Chwilkinson ,

     

    I would try and do this by adding a line to the OnSelect property of the button after SubmitForm that saves Form.LastSubmit in a (context) variable. If you then adjust the Default properties of the datacards in the form to first check if the variable has a value, using the Coalesce function, it should populate as per your requirements.

     

    Obviously if you have a "Save only" button, you'll have to add a line to the OnSelect property of that as well to blank the variable.

  • Chwilkinson Profile Picture
    125 on at

    Hi,

    I've got this working now using variables so thank you.  However there is one data value, the owners (Person or group type on SP list) that will not save back to powerapps on the save and copy button press.

    The values saves as a variable I wanted for the next form.  When I blank out the line of code the and run it the SP list updates, just doesn't save the variable to reuse.

     

    Below is the section of code that's causing issues, data card value being a person or group.

     

    Set(Variable,DataCardValue.Selected);

    SubmitForm(NewForm1);
    NewForm(NewForm1),

     

    Thanks

     

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

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard