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 form should retain...
Power Apps
Answered

New form should retain the last entered data

(0) ShareShare
ReportReport
Posted on by 559

Hi all,

I have a form which has default form has new. I have a save icon which save the value as draft. When save is clicked the entered datas should be able to retain in the same page. 

Any help /suggestion on this.

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    Hi @Uthhra ,

    This relates to the Item of your Form. The easiest way is when you select an existing record from a gallery OnSelect

    Set(
     gblRecord,
     ThisItem
    )

    Then your Form Item

    LookUp(
     SPListName,
     ID = gblRecord.ID
    )

    Then OnSuccess of the Form

    Set(
     gblRecord,
     Self.LastSubmit
    );
    ViewForm(FormName)

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • Sri Profile Picture
    559 on at

    @WarrenBelz 

    I don't have a gallery for new form. I have only a + icon which clicked navigates to New form. 

  • WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    @Uthhra ,

    Then just do the last two items.

  • Sri Profile Picture
    559 on at

    @WarrenBelz 

    In a new form I have two buttons. Save and Submit. When clicked on Save it must save the form as a draft and should retain the entered values and when clicked on submit it must be submitted to the SharePoint. If I click on Save and give the above set variable it retains the entered value but when clicked on submit it says Record already exists.

  • WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    Hi @Uthhra ,

    That is because the first action saved it. There is no such thing as "draft" saving unless you want to head down a path involving Variables. Is the user navigating off the screen - if not the form will retain the values.

  • Sri Profile Picture
    559 on at

    @WarrenBelz 

    No i have not given navigation. I have 2 separate forms for New And Edit form. The above scenario is for the New Form. The code which  I gave in the Save is SubmitForm(Form3) && Notify(
    "Details saved as draft successfully",
    NotificationType.Information,
    1000
    )

    Since for Newform the Default mode is New. It doesn't retain the last entered values.

  • WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    @Uthhra ,

    That is the nature of a new form - it presents with all controls empty unless you have set a Default value not related to the Data Source. You can still set this

    Set(
     gblRecord,
     Self.LastSubmit
    );

    then the Default of any controls needing their value retained to (using the actual field name)

    gblRecord.FieldName

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • Sri Profile Picture
    559 on at

    @WarrenBelz 

    Thanks a lot. It worked perfectly.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard