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

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
Super User
Super User

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

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.
9 REPLIES 9
Super User
Super User

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

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
Level: Powered On

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

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!
Super User
Super User

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

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
Level: Powered On

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

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

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

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

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

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...

 

Super User
Super User

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

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.
nealhicks1
Level: Powered On

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

@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.

Highlighted
nealhicks1
Level: Powered On

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

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
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 137 members 3,686 guests
Please welcome our newest community members: