cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nealhicks1
Helper III
Helper III

Issue where close/submit buttons don't function the way they should, or clear out old form data

Hello once again, everyone! 🙂

 

I think this should be my last post for a little, I hope (since I don't want to bother people too much), but I'm having an issue where the X (close) and check (save/submit) buttons don't have the right kind of behavior that I'm wanting.

 

Let me try and explain this better. Let's say, that in my SPO list, I click on the +New item button, and the follow form that I created in PowerApps displays:

 

image.png

 

 

 

Then, let's say I change my mind, and I click on the X button to close out:

 

image.png

 

 

 

 

This blank screen is basically what happens/shows up. Then, if I go back to the list, and click on +New again, the same blank screen will come up. Basically, whatever information/state the form was in previously is saved/cached, and that's what is displayed/presented to the user.

 

For the OnSelect property of the X (close) button, I have the following set:

Exit()

 

I have a feeling that this isn't the right behavior/function to call on. I basically need a way to:

 

1 - Close out the form using the X (close) button so that when +New is clicked, a blank/new form will load.

2 - Save and submit the form when the check (save) button is clicked, and then close out the form, and have a blank/new form load if the user clicks on +New again (without having to refresh the entire page).

 

As always, please let me know if I am not making sense, or if more details/images are required.

 

I wouldn't have been able to get this far with the form creation process without the people in this forum, and I really do appreciate your time and help.

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

The issue here is that you are using the PowerApps custom form for SharePoint and it gets display in a special SharePoint form that is designed to work with the buttons in the SharePoint form (Edit All, Save, Cancel and Etc). When you add your own button to the form to Close the PowerApp it only knows about the PowerApp and not the SharePoint form that is integrated with and that is why you see a blank screen when you exit the app that way. I would suggest trying to work with it as it is design by using the built in buttons (Edit All, Save, Cancel and Etc).



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

9 REPLIES 9
Jeff_Thorpe
Super User
Super User

The issue here is that you are using the PowerApps custom form for SharePoint and it gets display in a special SharePoint form that is designed to work with the buttons in the SharePoint form (Edit All, Save, Cancel and Etc). When you add your own button to the form to Close the PowerApp it only knows about the PowerApp and not the SharePoint form that is integrated with and that is why you see a blank screen when you exit the app that way. I would suggest trying to work with it as it is design by using the built in buttons (Edit All, Save, Cancel and Etc).



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
nealhicks1
Helper III
Helper III

Thanks for the input!

How would I go about using built in functions? I actually plugged in the Exit() function because by default, the X button wasn't doing anything.

Sorry if the solution is very obvious and I'm just missing it!

The buttons are already on the SharePoint form that is displaying the custom PowerApp form. If you look at your screenshots you'll see them at the top in a gray bar above the blue header on your form.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
nealhicks1
Helper III
Helper III

Ahh, I see! So is there no way to actually link the functionality of those built-in buttons to the PowerApp ones?

Not that I am aware of at this time.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Anonymous
Not applicable

It would be nice if there was some way to trigger a page refresh upon exiting. I actually managed to get the PowerApps save/submit button to save and close the window/form out, but yeah, can't seem to trigger a page refresh. Any thoughts on whether that might be possible? 

 

Edit: Something along the lines of what this user is trying to do: https://powerusers.microsoft.com/t5/General-Discussion/exit-and-return-to-custom-destination/td-p/38...

 

How were you able to get the custom Cancel and Save buttons to exit both the PowerApp form and SharePoint Form?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

@Jeff_Thorpe, apologies for the delay in response! 

 

For the X (cancel) button, I input: Navigate(Screen_Cancel, ScreenTransition.Fade)

 

That takes the user to a screen that instructs/asks them to refresh the browser. That's as good as I could get for the cancel button.

 

For the check (save/submit) button, I input: SubmitForm(SharePointForm1); Navigate(Screen2, ScreenTransition.Fade)

 

That way, the form is saved, and then a screen loads asking the user to do a refresh. It would still be wonderful if there was some way to just trigger an F5. There has to be some way, I'd imagine... still searching for that, though.

Oops, except if there is a validation error, it still navigates to the next screen. I'm trying to figure out how to include a validation check before it moves on to the next screen.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,888)