clear session variables

clear session variables


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!

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: and the value would be "".

Kind Regards,
oh, that easy!!!

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.

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
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?

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,