web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / New form without reset...
Power Apps
Answered

New form without resetting the fields

(0) ShareShare
ReportReport
Posted on by 14

Hi all.

So after submitting my form, I would like the new form to retain the fields used in the previous form.

The purpose for this is because my form has a lot of fields and it is quite unproductive to reselect all the same fields again for a different entry.

Any way that this can be done? Thanks in advance!~

Categories:
I have the same question (0)
  • tchin-nin Profile Picture
    779 on at

    Hey @raddy

    You should try using the LastSubmit property of your Form. 

     

    LastSubmit â€“ The last successfully submitted record, including any server generated fields.

    • This property applies only to the Edit form control.
    • If the data source automatically generates or calculates any fields, such as an ID field with a unique number, the LastSubmit property will have this new value after SubmitForm successfully runs.
    • The value of this property is available in the OnSuccess formula.

     

    On the default property of your control you may add something like this:

    If(form.mode=new,form.lastsubmit.property1,this item.property1)

     

    Cheers,

    Théo

  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @raddy,

     

    Could you please share a screenshot of your app's configuration?

    Do you want to retain the fields used in the previous submitted form when you add a new form within your app?

     

    I agree with @tchin-nin's thought almost, I have made a test on my side, please take a try with the following workaround:

    9.JPG

     

    I assume that I want to retain the Address field value used in previous form when I add a new form within my app. Please take a try with the following workaround:

     

     

    Set the OnSuccess property of the Edit form control (EditForm1) to following formula:

    Set(PreviousFormData,EditForm1.LastSubmit)

    Note: The EditForm1 represents the Edit form control within my app.

     

    Set the Default property of the Address Data card control to following formula:

    If(EditForm1.Mode=FormMode.New,PreviousFormData.Address,ThisItem.Address)

     

    Or 

     

    Set the Default property of the Text input control included within the Address Data card to following formula:

    If(EditForm1.Mode=FormMode.New,PreviousFormData.Address,ThisItem.Address)

    On your side, you should type the following formula within the Default property of the control:

    If(EditForm1.Mode=FormMode.New,PreviousFormData.propertyName,ThisItem.propertyName)

     

    The GIF image as below:Test1.gif

     

     

     

     

    Best regards,

    Kris

  • raddy Profile Picture
    14 on at

    Thank you! It worked well.

    However, it doesnt work well with dropdown.

     

    I used the same line of code for the dropdown's 'Default'.

    If(NewForm1.Mode=FormMode.New,PreviousFormData.Trade,ThisItem.Trade)

    Even if I start the app for the first time, there are values in the dropdown.

  • tchin-nin Profile Picture
    779 on at
    Hey,
    Have you tried
    If(NewForm1.Mode=FormMode.New,PreviousFormData.Trade.value,ThisItem.Trade.value) ?

    Théo
  • raddy Profile Picture
    14 on at

    Yep! It works. Thank you~Smiley Very Happy

  • MJBasa Profile Picture
    2 on at

    Hi, I tried this but not working on my end. Help please. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard