cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
CindyZ
Level: Powered On

Save Record and Stay on the Same Record

I've read lots of discussions on this but still don't feel I've found a clear answer.  

I would like to save my form and have it remain on that same form instead of going away.  Right now, the form has this in OnSuccess: ResetForm(OrderForm);RequestHide().  If I remove the RequestHide, it functions as I'd like -- EXCEPT -- when creating a NEW record.  

When I create a new record, it displays the very first record and not the one I just saved.  

 

Any thoughts on how to get it back to the just-saved record if a new record? 

 

Thanks in advance for your help and consideration.    

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Save Record and Stay on the Same Record

Hi @CindyZ ,

Do you want to remain the submitted form data within the Edit form when you create a new record?

Could you please show more details about the formula you typed within the Item property of the Edit form?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnSuccess property of the SharePointForm1 to following:

Set(SubmittedRecord, OrderForm.LastSubmit);
ResetForm(OrderForm)

 

Set the Item property of the SharePointForm1 to following:

If(
   OrderForm.Mode = FormMode.Edit,
   If(
      !IsBlank(SubmittedRecord),
       SubmittedRecord,
       SharePointIntegration.Selected
   )
)

 

Set the DefaultMode property of the OrderForm to following:

FormMode.Edit

 

Set the OnNew property of SharePointIntegration to following:

Set(SubmittedRecord, Blank());
NewForm(OrderForm)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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

2 REPLIES 2
Super User
Super User

Re: Save Record and Stay on the Same Record

Forms have a property: LastSubmitted. You can use that to see the details of the record you just saved.

You should then be able to use those details to set the Item property of the form and put the form into Edit mode, so after saving, you see the record you just saved in Edit mode in the form.

You may need to use to variables to store the LastSubmitted details and whether the the last submission was New or Edit.

Community Support Team
Community Support Team

Re: Save Record and Stay on the Same Record

Hi @CindyZ ,

Do you want to remain the submitted form data within the Edit form when you create a new record?

Could you please show more details about the formula you typed within the Item property of the Edit form?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnSuccess property of the SharePointForm1 to following:

Set(SubmittedRecord, OrderForm.LastSubmit);
ResetForm(OrderForm)

 

Set the Item property of the SharePointForm1 to following:

If(
   OrderForm.Mode = FormMode.Edit,
   If(
      !IsBlank(SubmittedRecord),
       SubmittedRecord,
       SharePointIntegration.Selected
   )
)

 

Set the DefaultMode property of the OrderForm to following:

FormMode.Edit

 

Set the OnNew property of SharePointIntegration to following:

Set(SubmittedRecord, Blank());
NewForm(OrderForm)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,245)