Hi
I am slowly building an app with weweb and xano with absolutely no coding experience.
I have created a collection table in weweb where the data is stored in xano. The table has a series of numbers. In xano I have created a function that adds these values to create an aggregated number. In weweb I have created a variable to retrieve the aggregated number. This aggregated number is correctly displayed as the user adds a new value to the table. However when the user moves to a new feature of the app and then returns to the table the aggregate umber is no longer displayed and just shows ‘0’. I have checked that the variable still stores the correct aggregated value.
How do I fix this so that the aggregated store value remains visible?
Many thanks for anyone who might be able to assist
Paul
Hi I found this explanation - Persistent variables and collections
Variables that are preserved on navigation – i.e. when the user changes page while navigating inside the app – are cleared from the user’s browser as soon as they navigate away from the app or if they refresh the page. This new setting means that you no longer have to save variables in local storage to ensure variables persist between pages.
Does this mean I need to build an api in xano to retrieve the aggregated value so that the user can see that value when they navigate back to the page?
No, it means you can set “persist on navigation” so the variable doesn’t reset when your user navigate to another page in your app and come back later.
And you can set “Store in localstorage” if you want the variable to hold the value even after a refresh or user leave the app and come back later.
But yes, you can also request your xano endpoint each time your user enter the page, to get an always up to date data.