cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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

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.

Memorable Member
Memorable Member

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

Théo

Yep! It works. Thank you~Smiley Very Happy

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (19,968)