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.
Solved! Go to Solution.
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,
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.
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,
One issue with this process, although it works, the form cannot be opened and edited. SharePoint opens the form and it just says "Getting your data" and never shows any fields. Any idea how to solve this? The rest of your process works well.
This is the issue: If( SharePointForm1.Mode = FormMode.Edit, If( !IsBlank(SubmittedRecord), SubmittedRecord, SharePointIntegration.Selected ) )
When I go back and open the item it just says getting data and never opens.
While the default works, on save it bounces back to the previous record entered: If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First([@'Test List']),SharePointIntegration.Selected)
I'd like it to stay on the existing record I just saved. Any way to modify the first statement to accomplish this?
I solved on my own by doing the following: If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),Last([@'Test List']),SharePointIntegration.Selected) That is the default statement in the form generates, however I change First to Last in the statement. I opened several tabs with the same list and had saved multiple records, and each one remained on the existing record.
These solutions don't work if the Form is connected to a Gallery.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
205 | |
70 | |
49 | |
49 | |
20 |
User | Count |
---|---|
252 | |
124 | |
84 | |
76 | |
73 |