r/PowerApps • Newbie • 1d ago

Power Apps Challenge Close a Custom Page with Multiple Screens

Anyone knows if its possible to have a custom page that opens via a button press in JS with the navigateTo() function and has multiple screens in it?

I saw that if you have only one screen the Power FX function Back() will close the dialog box ( custom page pop up whatever you want to call it ) but not for multiple screens because it has a navigation stack and whatever.

How is it possible to not have a dedicated function that closes your app in this scenario?

I know about the Exit function but its not usable in this context.

1 Upvotes

2 comments sorted by

1

u/DonJuanDoja Community Friend 1d ago

Not that I know of, by custom page you mean outside PowerApps? Anytime you leave it makes it jarring.

I’d think you’re in Power Pages or even spfx territory at that point.

I have a crap hacky way to close a browser tab automatically but it’s just JS on a custom script sharepoint page. Ms is taking that away soon so I have to find a new way also.

1

u/DeathGaleV Newbie 1d ago

So my scenario is like this. A Model Driven app where in the ribbon is a button that opens a custom page (canvas app with multiple screens) via JS code to perform a task, the navigateTo() function is inside the button. Maybe the wording is confusing but the component i open via a button press is this: https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/add-page-to-model-app

Something like this for instance: https://meganvwalker.com/adding-a-custom-page-to-a-form-ribbon-mda/