Variables used

A variable has to be created before the application is being published. After an application has been published in Qlik Sense Server, only session variables can be created. A variable has to be created before the application is being published, If an app has been published in Qlik Sense Server you can only use session variables. A session variable lives and dies within the session.

Note: Session variables are never listed in VariableList.


  • CreateVariableEx


  • GetVariableById

  • GetVariableByName

  • GetVariableList


  • DestroyVariableById

  • DestroyVariableByName

Session Variables

  • CreateSessionVariable

  • DestroySessionVariable



private IVariable CreateVariable(IApp myApp)
	return myApp.CreateVariableExpression(null,new VariableProperties
		Name = "Sales2012",
		Definition = @"=Year(Today())-3"


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

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?