Session variables equivalent for Mobile Apps

On our radar

We need some kind of Global Variable for Mobile apps to store Session Data that can be shared across multiple screens. I tried using a Local entity but it appears you can use Local Aggregates in Client Functions.

Created on 18 Nov 2016
Comments (6)

Hi Francisco,

Thanks for the feedback!

Just to complement, can you add some examples where this feature would be useful?


Vasco Pessanha

I have an example/use case:

When user login, user is presented with a list of event (event name, venue, date, etc) to choose.

Then after that, all corresponding screens will only show for that chosen event only.

I tried to use Local Storage to save chosen event, then OnInitialize retrieve it and save it to variable varEventId.

But somehow, OnInitialize and Aggregate (with filter using variable varEventId) run in paralel/asynchronously.

Because my aggregate was using empty varEventId to query.

Then I tried Keystore Plugin, somehow using keystore plugin, variable varEventId successfully populated before running Aggregate, because my aggregate return correct rows.

But we have problem with Keystore plugin (some security requirement, like Android need secured lock screen) that sacrifice user experience.

When user find this "fault", user tends to uninstall it. (public, self registration).

So, in the end, we need a session variable in mobile apps, to replace keystore plugin.



I was looking for the session variable to store the role of the user in the login process, to avoid to go to the server to check his roles again.

I will try with a local entity, but yes would be nice that Outsystems provide us a Session Variables (Local Storage) to avoid that this workaround.

Thank you

We also need shared session between apps. After logging in on app A, if then you open app B you are still logged in with the same credentials, assuming A and B are apps built from the same server.

In enterprise scenarios with IdP and single-sign-on, this makes a lot of sense, and web apps have this solved already.


I was looking for pre-filling the Username input widget, for that purpose i am supposed to store the value provided by the user in a global variable rather than storing it in a local variable or an Entity and i just want to use that global variable in various screens wherever i placed the logout functionality.


I was looking to do metrics for the user that is logged in. I want to log one entry per session. A session variable will be useful.