Skip to main content Skip to complementary content

CreateVariableExAsync Method

Overloads

CreateVariableExAsync(GenericVariableProperties)

Creates a variable.

To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable.

Definition

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used.

When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example

The variable x contains the text string Sum(Sales) .

In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 .

However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

CreateVariableExAsync(AsyncHandle, GenericVariableProperties)

Creates a variable.

To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable.

Definition

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used.

When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example

The variable x contains the text string Sum(Sales) .

In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 .

However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

CreateVariableExAsync<T>(AsyncHandle, Func<Response, T>, GenericVariableProperties)

Creates a variable.

To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable.

Definition

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used.

When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example

The variable x contains the text string Sum(Sales) .

In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 .

However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

CreateVariableExAsync(GenericVariableProperties)

Creates a variable.

To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable.

Definition

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used.

When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example

The variable x contains the text string Sum(Sales) .

In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 .

However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Declaration

      Task<CreateVariableExResult> CreateVariableExAsync([QixName("qProp")] GenericVariableProperties prop)
    

Parameters

Type Name Description
GenericVariableProperties prop

Name of the variable. Variable names are case sensitive and must be unique.

Returns

Type Description
System.Threading.Tasks.Task<CreateVariableExResult>

Remarks

To set some properties to the variable, use the SetProperties method.

CreateVariableExAsync(AsyncHandle, GenericVariableProperties)

Creates a variable.

To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable.

Definition

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used.

When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example

The variable x contains the text string Sum(Sales) .

In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 .

However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Declaration

      Task<CreateVariableExResult> CreateVariableExAsync(AsyncHandle asyncHandle, [QixName("qProp")] GenericVariableProperties prop)
    

Parameters

Type Name Description
AsyncHandle asyncHandle

Handle to asynchronous method request

GenericVariableProperties prop

Name of the variable. Variable names are case sensitive and must be unique.

Returns

Type Description
System.Threading.Tasks.Task<CreateVariableExResult>

Remarks

To set some properties to the variable, use the SetProperties method.

CreateVariableExAsync<T>(AsyncHandle, Func<Response, T>, GenericVariableProperties)

Creates a variable.

To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable.

Definition

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used.

When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example

The variable x contains the text string Sum(Sales) .

In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 .

However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Declaration

      Task<T> CreateVariableExAsync<T>(AsyncHandle asyncHandle, Func<Response, T> onResult, [QixName("qProp")] GenericVariableProperties prop)
    

Parameters

Type Name Description
AsyncHandle asyncHandle

Handle to asynchronous method request

System.Func<Response, T> onResult

Continuation function

GenericVariableProperties prop

Name of the variable. Variable names are case sensitive and must be unique.

Returns

Type Description
System.Threading.Tasks.Task<T>

Type Parameters

Name Description
T

Remarks

To set some properties to the variable, use the SetProperties method.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!