Main Menu > Website Setup > Session Variables
Manage Session Variable
Use this feature to set session variables for your application.
- Name: Provide a name, no embedded spaces. Your session variable will be defined as "session.<name>".
- FooterID: Optional, only useful if you turn debugging on. Shows the session variable and assigned value in the web page footer.
- Type: Only allowed type in Alpha Anywhere is "C" for "Character".
- Availability: Toggle if the session variable is available whether the user is logged in or always available.
- Expression: Enter a value or expression for the session variable. See examples below.
- Omit: If checked, the session variable will not be defined.
- Sort Order: Optional, set the order for creating and setting session variable. Only useful if a subesequent variable needs to include a previously-created session variable.
Expression examples:
Note - the expression must return a character value.
- "Steve" - will set the session variable to the word "Steve"
- "5" - will set the session variable to the word "5" (as a character value)
- crlf_to_comma(a5ws_get_user_assignments(pUser.userid,request)) - a valid xbasic statement to set the session variable to the Security Groups assigned to the logged in user.
- if(wt_setup("testmode_on")=.t.,"Y","N") - a valid xbasic statement using one of the Framework's functions to return the value of "testmode_on" from the table wt_setup.