show / hide menu

Session Variables

An Appform Session variable is used to store information for a user session. Variables stored in Session variable hold information about one single user and are available to all forms in one application. Common information stored in session variables is name, id and preferences. The application creates a new session variable for each new user and destroys the session object when the session expires. These variables can be accessed in the rules, data sources etc.

Working with a Session variable:-
Create a Session variable; this can be done by opening Session Variables menu from Links tab (Figure 9).

Figure 9

A wizard for creating variable will be opened in the right window pane (Figure 10).

Figure 10

Create a variable by entering the variable name and then click on save button (Figure 11).

Figure 11
Figure 12

How to access Session variables in forms
Session variable can be accessed by using Session function this is illustrated below
Session Function: – This function is used to get the session variables of current tenant. The syntax of the function is shown in Figure 13.

Figure 13

The rule for accessing Session variable is shown in Figure 14.

Figure 14

User can access the Session variable in any forms in the application.