Hi everyone,

 I am having trouble with the following!
- I have a mobile app A
- I have a module in a web app that exposes Action1
- In Action1 I set a session variable
- In app A I call Action1, thus setting the session variable ( to 123 for example)
- If I call, from app A, a server action that gets the session ( which is now 123) it comes empty

NOTE1: On debug mode I see that the session is indeed set to 123 when I first call the server to set the var
NOTE2: On debug mode I see that the call to the action to get the session the session is indeed ""
NOTE3: I have logged in with OS user and no screen is with anonymous set!

NOTE4: Outsystems 11 11.6.30

Now the question is why dont I see the session ( that exists in another web app module) as "123" after setting it to "123" from the mobile app?


Guilherme Menescal Dantas.


Hello Guilherme,

In Web Applications, OutSystems uses several mechanisms that allow the server to maintain information about the previous requests the end user made. One of the mechanisms are Sessions. A Session is created in the first request the end user makes to the Platform Server and allows to keep context during the end user interactions with the server. The session consists in the set of session variables defined in the modules the end user accesses during its interaction.

In Mobile Applications, it's a bit different since you don't have a Session associated to a mobile device. Each request to the server is completely independent and you cannot store session variables (if you do, you will lose their values).

However, you still have a session context in the server side. That's why you are able to set the value in that session variable, but if you call your Action1 from a Mobile App then you will get an empty value.

My suggestion: use the Local Storage to store the information that you need to use.

Kind regards,

Rui Barradas