web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issue where close/subm...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 94

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.

Categories:
  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

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

  • nealhicks1 Profile Picture
    94 on at
    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!
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    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.

  • nealhicks1 Profile Picture
    94 on at
    Ahh, I see! So is there no way to actually link the functionality of those built-in buttons to the PowerApp ones?
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Not that I am aware of at this time.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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/38845

     

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

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

  • nealhicks1 Profile Picture
    94 on at

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

  • nealhicks1 Profile Picture
    94 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard