There are a variety of reasons why you would want to introduce a session
variable.
For example:
- You can have an application set a session variable and use it
inside a template snippet, without having to design a form field or
a static label in the form.
- You can place a hidden field in an HTML form that will be sent
along with other form data (and fetch them from the application) without
having to design a form field in the 4GL form.
- From the client-side front-end (CSF), you can use a session variable
to hold data that can be used from inside a template snippet to keep
a state between two page updates.
- From the browser, you can save the session variable as an HTTP
cookie to hold data that can be retrieved between two runs of an application
by the same user. For example, to store the users preferences.