Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Patrik Horemans
88
Views
6
Comments
clear session variables
Question
Hi,
I'm quite new to this application and have been using the lessons.
At one point in time you use session variables to filter data comming from record.
Rather than clearing out the fill in boxes or set the combo box to "all", i would like to add a buttong "clear filter"
This buttong should clear the session variables, but i don't know how to...
any suggestions?
Many thanks!
Evert van der Zalm
MVP
Hello Patrik,
You could empty the session variables just by using a assing and put empty values into the session variables.
So having a session var: name, type text. You should use a assing and the variable is: Session.name and the value would be "".
Kind Regards,
Evert
Patrik Horemans
oh, that easy!!!
Thanks!
mohammad alghouleh
Hello Evert,
i tried to do the steps you provided, but its not working.
your help is greatly appreciated
after the user loggedout, and press the back button, the user logged in again to the previous session, which is wrong.
thanks
Andrew Tabata
Hi Mohammad,
Where did you put the assign? Assign the session variable = "" at the preparation of the webscreen.
This way whenever page is loaded, that session variable is cleaned.
Best Regards
Andrew Tabata
Tiago Neves
Hi Mohammad,
It doesn't make sense the situation you are describing. Whenever a user logout, the session variables are cleared. You are saying that you press the back button... ok, the records will still be there, but that's on the browser cache. After logging out and pressing the back button, If you try to do something on that screen, like click a Save button or any link, you will be prompted to login and your session variables will be empty...
Do you have a different scenario from what I described?
Evert van der Zalm
MVP
Hi Mohammed,
It's indeed what Tiago describes. The logout function, clears all session variables. Since the browser back button restores the session hold by the browser, the browser will think there is a session (so the user isn't loggedin again, the browser think that it's still loggedin, but at the server side there isn't any).
Think that what you could do is create an system action (OnSessionStart/OnBeginWebrequest) where you check if the user is logged in or not (session.UserID). Depending on that one you could create some logic. But I don't know for shure if the browser will call those actions with the browser back.
Kind regards,
Evert
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...