I would like to show the last selected/viewed room when user opens/logs back in the page. Currently, my setup is on page load, a popup shows with a repeating group showing these rooms that user created (can be more than 5). After selecting that room, the popup closes and a state is set to another group at the home page to show the room details.
My problem is, i cant find a way to get this last selected room to show once user logs back in or opens the page again or if it refreshes. Instead, i made it so the popup shows again where user selects the room again.
Can i get assistance on this please?
This is the state of the group that shows the room details on the page
The filter settings of that state
The repeating group’s cell state on press (selected), also same filter settings as above
Hi there, @notjrag… if I understand your post correctly, you could consider saving the most recently viewed room to a field on the
User data type. Any time a user views a room, update that field, and when the page is loaded, use the field to show the last room the user viewed. Even if you don’t go this route, you are going to have to use the database or local storage to accomplish what you described because custom states do not persist across page loads/refreshes.
Hope this helps.
I was actually thinking of doing this one… But dont know where or how to start. You’ve given me an idea though so il try that and update once its a success.
Thank you, Mike!
IT WORKS!!! Hahaha cant believe it was just that simple.
Again, thank you so much!
This topic was automatically closed after 70 days. New replies are no longer allowed.