cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
raddy
Frequent Visitor

New form without resetting the fields

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!~

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
tchin-nin
Memorable Member
Memorable Member

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

v-xida-msft
Community Support
Community Support

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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
Memorable Member
Memorable Member

Hey,
Have you tried
If(NewForm1.Mode=FormMode.New,PreviousFormData.Trade.value,ThisItem.Trade.value) ?

Théo
raddy
Frequent Visitor

Yep! It works. Thank you~Smiley Very Happy

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,700)