Set Datasource Variable
  • 16 Apr 2024
  • 1 Minute to read
  • Dark
    Light

Set Datasource Variable

  • Dark
    Light

Article summary

General

This type of action can be used to set the value of the variable of a Datasource.

Properties

This type of action has the following properties:

Name

Description
Datasource VariableThe datasource variable whose value shall be set.
ValueAn Expression that evaluates to the string (text) value to set the variable to.

QlikView and Qlik Sense Considerations

When setting a variable in a QlikView or Qlik Sense Datasource, the value of the variable needs to be a string (text value) that contains the same QlikView or Qlik Sense expression you would enter in QlikView or Qlik Sense itself to define the variable.

Example 1: Numeric Value

The value expression needs to return the following string in order to set the variable to the numeric value 1:

Qlik Expression

=1

In order to achieve this return value, the Mail & Deploy expression could look like:

Mail & Deploy Expression

"=1"

Example 2: Text Value

The value expression needs to return the following string in order to set the variable to the text value Hello World:

Qlik Expression

='Hello World'

In order to achieve this return value, the Mail & Deploy expression could look like:

Mail & Deploy Expression

"='Hello World'"

Example 3: Date Value

The value expression needs to return the following string in order to set the variable to the date value January 3rd 2021:

Qlik Expression

=MakeDate(2021, 1, 3)

In order to achieve this return value, the Mail & Deploy expression could look like:

Mail & Deploy Expression

"=MakeDate(2021, 1, 3)"


Was this article helpful?