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 / Edit Form - Remember D...
Power Apps
Answered

Edit Form - Remember Data from Previous Form Submission

(0) ShareShare
ReportReport
Posted on by 41

Hi there, 

 

I've set up a Power App which uses an EditForm to submit new items to a Sharepoint list for the purposes of timesheet entry. My original problem was that when I made a submission with the form, as soon as I submitted the first item, all of the data disappears from the fields and the user then needs to fill all the data out again on the second submission. Usually on the second submission, I was finding that the data remains in the fields so it doesn't need to be filled out again - but I would like this to happen on the first submission also.

 

Just to clarify, because with timesheets some of the data usually stays the same (such as user's name, work type, date etc.) I would prefer that the data fields remember the previous input and the user can tweak those fields to submit a new item. 

 

As a solution, I began to use CurrentSubmittedRecord in the onSuccess field of the form, as well as giving the edit form (in FormMode.New) the item name of CurrentSubmittedRecord. While this seems to solve the problem above (because now whenever the user fills out the form and  submits, the form remembers the previous record, the issue here is that new items are not submitted but overwrite the previous entries on Sharepoint - so the form seems to be changing into Edit Mode...?

 

My solution would be a situation where a user opens up the form, fills in the timesheet details, submits those details which logs item A on the Sharepoint Timesheet list. Then the user finds all the same data they just input remaining and can make tweaks to a specific field such as Job Number and hours, and hit submit, and this logs item B on the Sharepoint Timesheet list (without overwriting item A above). 

 

N.B. Please note I also have a display form with the item name Form1.LastSubmit which displays details of the previous submission so users can see that their last entry has been logged on Sharepoint. I mention this so that it's taken into account with any suggestions. 

 

Any thoughts would be greatly appreciated as I've been looking for a solution for a few days. Thank you. 

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

    Hi @redturtle ,

    I am not entirely clear on your process here, but if you want selected fields as Default when the form is in New Mode, set a Variable on the OnSuccess of the form

    UpdatContext(
     varRecord,
     Self.LastSubmit
    )

    then the Default of the fields you want to retain value would be (replace with current value)

    If(
     YourFormName.Mode = FormMode.New,
     varRecord.YourFieldName,
     WhatItIsNow
    )

     

    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

     

  • redturtle Profile Picture
    41 on at

    Hi @WarrenBelz thanks for your reply. 

     

    i. Is the field name taken from the "Data field" in the control?

    ii. Do I leave in that text "WhatItIsNow" or does that stand for something else? 

     

    Thanks.

    If(
     YourFormName.Mode = FormMode.New,
     varRecord.YourFieldName,
     WhatItIsNow
    )

     

  • Verified answer
    WarrenBelz Profile Picture
    156,100 Most Valuable Professional on at

    @redturtle ,

    1.  Whatever the field name is that you want to default in the new record.

    2. It is a place marker for whatever your current Default is on the control.

  • redturtle Profile Picture
    41 on at

    Hi @WarrenBelz I actually managed to do what I wanted. Below was my solution (but applied to relevant fields).

     

    Submit button, OnSelect:

    set(currentHours,Form1.LastSubmit.Hours); 

     

    And then setting the Default on the control of the Hours field to currentHours.

     

    Admittedly, this has now caused an issue with my Form1.LastSubmit Item of my display form showing the last submitted record. 

     

    Thank you for your help. 

     

    R

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard