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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How is Back function s...
Power Apps
Unanswered

How is Back function supposed to work?

(0) ShareShare
ReportReport
Posted on by

How exactly is Back() function supposed to work?

Microsoft Docs says: "The Back function returns to the screen that was most recently displayed."

However I now created an app with a couple of screens where the behaviour seems to be slightly different.

If I navigate from Screen1 to Screen2 to Screen3 and use the Back function there, it takes me to Screen2 as expected.

If I use the back function again on Screen 2, I would expect PowerApps to take me to Screen3 (= the screen that was most recently displayed). But it takes me to Screen1 instead.

Is the description on MS Docs incomplete/wrong or did I miss something?

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    What you are seeing is the expected behavior.  As you navigate through screens they are added to a stack.  The Back button takes you to the screen that was the next on the stack.  So if you navigate back from Screen3 to Screen2 that removes Screen 3 from the stack.  So doing back again will take you back to Screen 1.  Basically navigating back will forget that you were on Screen 3, so its no longer the most recent.

  • Magra Profile Picture
    on at

    Oddly this Post from a MS guy says exactly the contrary:

    https://www.techmikael.com/2019/03/a-simple-solutions-to-implementing.html

     

    "The caveat with Back is that it doesn’t build a navigation history, but remember the previous screen only. This means that if you go from screen 5 to 4 using Back, then the next Back call will take you to 5 again, not screen 3."

     

    Of course that may have been changed since 2019.

  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Back will take you to the screen that you Navigated from.  If you got to the screen by using back it doesn't count that as navigation. Navigate builds the stack.  Back just removes things from the stack.  In this case I think Mikael is wrong, which doesn't happen very often.  Back basically uses the same functionality as Back in your browser.  If you go back in your browser it doesn't add the website you are backing from to the path.  Hitting back again will take you to the previous web site in your history, not the one you backed out of.  Power Apps is the same

  • PDRinoG Profile Picture
    40 on at

    Hi,
    How to check if a user already navigated between screens? In the documentation I found this: "Back normally returns true but returns false if the user hasn't navigated to another screen since starting the app." I'm currently not able to get this working.

    I have created an app, that can be started from a link in a Teams chat message. The app will open a variable screen and shows immediately all details of an item from the message. But at that time the user didn't navigate between screens and Back() will not work. I would like to hide the button or I would like to navigate the user to the home screen when Back() is false.

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-navigate

  • Magra Profile Picture
    on at

    Hi PDRinoG

     

    I would do that with a boolean variable. Set it to false by default respectively on application start, and to true once user clicks one of the navigation buttons. Then set the visible property of the back Button to that variable.

  • SKowalskiUSAA Profile Picture
    2 on at

    Coalesce() works

    I thought Coalesce was working, but further testing seems to not work as expected.

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard