cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AdriaanOlivier
Regular Visitor

Help stop the Save button from closing my form

Good day all,

 

I am sure this is an amateur hour question but that is what I am. I am busy with a pet project to streamline some reporting functions.

(Essentially I want to stop our people from saving technical support session info in OneNote or random Word documents that is not centralized).

 

In my pursuit I have created a list, it captures the basic data for a support session but then all the complex notes and screenshots will be captured in a word document. The possibilities of is just too endless to be able to create a single form to capture all possible scenarios so a word doc works. I have created the flow that will create the Word doc according to a template when a new list record is created. The Word doc is just a copy of a template and it saves it to a library and you can open it in Sharepoint or Teams etc while you have the Sharepoint list open in another screen.

 

Okay, deep breath... Now for my question, to create the Word doc, the out of form Save button has to be clicked. This closed the open form. I don't want it to close, I want to be able to continue working on that form without having to open it again?

 

In Powerapps I tried to change the Syntax of the OnSuccess formula in the SharePointForm1 properties to various things and combinations, (the default being ResetForm(SharePointForm1); RequestHide() ). If I remove the RequestHide() it works but the form defaults to the first item in the list.

 

I have spent a whole day searching for solutions and I can't find anything definitive. I would imagine this has been asked in the past but I can't find an answer.

 

Please help.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @AdriaanOlivier :

   Do you want to submit a custom form without closing it?

   I have tried many methods, as long as the SubmitForm() function is used, the RequestHide function will be triggered to close the form. This seems to be a built-in function and we cannot change it.

   To avoid this situation, I suggest you use Patch() instead of SubmitForm.For example:

1\Set the SharePointIntegration's OnSave Property to

If(
  IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),
  Patch(ListA,Defaults(ListA),SharePointForm1.Updates),
  Patch(ListA,SharePointIntegration.Selected,SharePointForm1.Updates)
);/*ListA is my list*/
ResetForm(SharePointForm1)

1.JPG

The Result

35.gif

We can find that:

  • The form will not be closed immediately after clicking save
  • The data in the list has actually been modified, but it will not be displayed immediately. You can hit "F5" to refresh the page to display the latest data

Best Regards,

Bof

 

 

 

 

View solution in original post

3 REPLIES 3
jbrit2020
Super User
Super User

Put NewForm(SharePointForm1) instead of ResetForm on the OnSuccess property

jbrit2020, thanks but no dice. When I press the save button, it does not close the form which it what I want, but it resets to a blank form which is what I guess the intention of the NewForm(SharePointForm1) command is.

 

After playing with it bit more I have the following in my arguments:

AdriaanOlivier_1-1610926699687.png

I am not sure if leaving the OnSuccess field blank is a good idea but changing the highlighted part of the argument in the item box from "First" to "Last" seems to work as I want.

 

If anybody can tell me if this will become an issue later on as the list grows it will be great.

 

Thanks

Hi @AdriaanOlivier :

   Do you want to submit a custom form without closing it?

   I have tried many methods, as long as the SubmitForm() function is used, the RequestHide function will be triggered to close the form. This seems to be a built-in function and we cannot change it.

   To avoid this situation, I suggest you use Patch() instead of SubmitForm.For example:

1\Set the SharePointIntegration's OnSave Property to

If(
  IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),
  Patch(ListA,Defaults(ListA),SharePointForm1.Updates),
  Patch(ListA,SharePointIntegration.Selected,SharePointForm1.Updates)
);/*ListA is my list*/
ResetForm(SharePointForm1)

1.JPG

The Result

35.gif

We can find that:

  • The form will not be closed immediately after clicking save
  • The data in the list has actually been modified, but it will not be displayed immediately. You can hit "F5" to refresh the page to display the latest data

Best Regards,

Bof

 

 

 

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,946)