Variables
Variables used
A variable has to be created before the application is published. After an application has been published in Qlik Sense Server, only session variables can be created. A session variable lives and dies within the session.
Create
-
CreateVariableEx
Get
-
GetVariableById
-
GetVariableByName
-
GetVariableList
Destroy
-
DestroyVariableById
-
DestroyVariableByName
Session Variables
-
CreateSessionVariable
-
DestroySessionVariable
Scenario:
Example:
private IVariable CreateVariable(IApp myApp) { return myApp.CreateVariableExpression(null,new VariableProperties { Name = "Sales2012", Definition = @"=Year(Today())-3" }); }
Example:
private IVariable CreateSessionVariable(IApp myApp) { return myApp.CreateSessionVariable(null, new VariableProperties { Name = "Sales2011", Definition = @"=Year(Today())-4", }); }
The following variables are obsolete and will be removed within a year
-
CreateVariable
-
GetVariable
-
RemoveVariable
-
SetFavoriteVariables
-
GetFavoriteVariables