addToVariable

void session.addToVariable ( String variable, int value ) (professional and enterprise editions only)

Description

Add to the value of a session variable.

Parameters

  • variable Key of the variable, as a string.
  • value Value to be added to the variable, as a integer.

Return Values

Returns void. If the variable doesn't exist, or is not a string or integer, a message will be added to the log. If it cannot add to the variable for any other reason it will write an error to the log.

Change Log

Version Description
4.5 Available for professional and enterprise editions.

Examples

Increment Variable

 // Increments the session variable "PAGE_NUM" by one.
 session.addToVariable( "PAGE_NUM", 1 )

See Also

  • getVariable() [session] - Returns the value of a session variable
  • getv() [session] - Returns the value of a session variable (alias of getVariable)
  • setVariable() [session] - Sets the value of a session variable
  • setv() [session] - Sets the value of a session variable (alias of setVariable)