Automatically Refresh a page after returning to it?


Reffering to This video, I have the app built with simple booleans and switches, but the video makes no mention on automatically refreshing the main page (or “list” page in the video) after adding a new item to the backendless table.
The main page does not have an event “condition” for returning to the page from a previous or further page, which would allow for me to simply run the api request every time the page is returned to. My only workaround for now is to have a refresh button, but i would like my application to automatically refresh the page after making a new item.
Is there a workaround for this or something that I’m missing?
Thank you in advance!


Good question. There’s a few ways to get the interaction to happen. What you have is a “Page Appeared” event on a page. You can do your GET api call for the todo list here and refresh the table with the Response. That’s a good way to go in this situation.


If you want, you could also create a Boolean Device variable and switch it anytime you make an adjustment to the Table like sending a new item to Backendless. Then in this Page Appeared event, you could only run the GET API Request IF the device variable is true/false accordingly. That way it’s a bit more efficient and only asking for data when it’s been adjusted on the backend for instance.