Setting session variables with front-end functions

A set of front-end functions allows you to dynamically set and get session variables from within your Genero application.

Reminder of Genero Front-End call syntax

ui.Interface.frontCall( module, function, parameter-list,
returning-list )

Front-end functions of the session module

Table 1. getvar and setvar front-end functions
Function name Description
getvar

Return the value of a session variable.

Parameter:
  • name of the session variable.
Return:
  • value of the session variable or empty string if the variable does not exist.
setvar

Set a value to a session variable.

Parameters:
  • session variable name
  • session variable value
Return:
  • 1 if successful, 0 otherwise.
Note: Setting a variable to an empty string is equivalent to deleting the variable.