Clearing Data Variables on Log Out


Part of our app requires the user to log in, but other parts are accessible if a user is not logged in. We do this so that potential users can play with the app a bit before creating an account. We just use default variables.


When a user logs out, we clear their Page Variables and App Variables. However, I can’t seem to find a way to clear the data variables:

I need to either reset those to the dummy variables or clear them out entirely so that they don’t reveal the user’s personal data after the user has logged out.

How can I clear data variables?

If I understood correctly, I’d probably just set each data variable to an empty Object / Array via formula, that should probably do what you want. However, you can only access each data variable on its page, and whenever the page is opened again, it creates a new data variable (the garbage collection on data variables could definitely be better). Another option is to use page variables instead of data variables on each page, but that would require you to do quite a lot of refactoring at this point. In general, I wouldn’t worry about clearing data variables, but if you’re specifically worried that there will be very sensitive information there, I understand.

1 Like