Session variable reset

Session variable reset

  

Hi

I have one Session Variable of type entity. I am assigning form value to this session variable and at next page after submitting another form I want to Reset Session variable. How we can do it by onetime assigning value to session variable. I don't want to do it by assigning each session variable value.


Thanks....     

If you don't want that, then simply logout and login the user.

This is of course not recommended!


I weould rather suggest to think how to tackle this issue WITHOUT a session variable, because they are meant to be alive for the session and thus change not that often.



J. wrote:

If you don't want that, then simply logout and login the user.

This is of course not recommended!


I weould rather suggest to think how to tackle this issue WITHOUT a session variable, because they are meant to be alive for the session and thus change not that often.



Actually I have two screen, Screen 1 having form data by clicking on next i want to save those data in session and will goes to Screen 2 having back and Submit button to submit the form With Session Data. After Submit I wanted to Flush session variable (entity type) Data. I don't want to user to logout. 

Hi Rohan,

First let me tell you Session Variables of large/complex data types can have a negative performance impact on your applications, so you should use them carefully.

Second, if all you want is clear all the attributes of a variable in a single assign, you can declare a Local Variable of the same data type (let's say you called it Empty) and then assign to your variable the value of the Empty local variable. Since you didn't initialise any of the attributes of the Empty local variable, they will have the default values of their data types, and since assignments are done by value, the platform will simply copy the values in the Empty local variable's attributes to your variable's respective attributes.

Hi Rohan Hanumante,

Just follow the below steps to achieve this 

1:-Create a session of list type(Not entity type) 

2:-and bind the screen record to the session.current record.

3:-while saving pass the session.current record to the save action 

4:-now use the list clear action of outsystetms to clear the list it will clear all the attribute of the list record once.


Thanks

Rajendra Singh