How to Persist User Navigation State Across Sessions

Hi Gliders,

I’m working on an app with multiple navigation flows where users can follow different paths based on their selections. Currently, when users log back into the system, they always land on the main screen and need to re-navigate their previous path.

I’d like to implement a beavior where the app remembers the last screen a user visited before logging out, so they can resume from that same location upon their next login.

Any recommendations for the best approach to handle this?

Thanks in advance!
Yan.

First, you could use an auto trigger AI Component on every screen so the app can save the current screen the user is on.

You can ask the component to trigger on load without all the prompt I provide.

Next, you could try to make a workflow that check if the user has a last screen value on his profile (or another table).

You can use a mix of this thread too:

Let me explain:

  • Create a new empty screen and move it on top to make it the first screen on the app.
  • Add a visibility condition on it so it is hidden if user isn’t signed in.
  • Hide from the nav. OR add custom CSS to your app using the first screen navigation item selector: set it to display:none;. That way, on login, user would be redirected to that screen. But after changing screen, they won’t be able to see and access a “redirector screen”.
  • Add another auto trigger custom AI Component to execute the “go to tab” action. Use the user profile last screen column that you used to save the current screen with auto trigger on every screen.

That’s it! :slight_smile:

If you need further help, don’t hesitate!

1 Like

Clever thinking!

Wouldn’t you just need to hide the tab from nav bar to do this?

You are right I don’t know why I thought another thing :joy: I edited my post. Thanks!

1 Like