What are Dynamic Values and how to use them in Mail & Deploy?

What are Dynamic Values and how to use them in Mail & Deploy?

FIRST CREATED 17 May 2023 I AUTHOR Emma Camacho

Expressions are dynamic values - values which are dynamically obtained by the expression at the time of its evaluation. 

Example: You want to add a text report element to a report and you want the text element to contain the current value of the datasource field "Year". In that case, you would use a dynamic value that will be evaluated by Mail & Deploy when creating the text element. 
The exact syntax of dynamic values depends on the type of dynamic value.

Datasource Field Value
This dynamic value can be used to insert the values of a datasource field. Only values which match the current filter state of the datasource will be added. If you want to manually type in the dynamic value, you can use the following syntax:
[Datasource].[<name_of_datasource>].[Field].[<name_of_field>]
If you want to automatically insert the syntax for this dynamic value, you can click the button in the expression editor and then click Datasource Field Value. A new dialogue will appear which allows you to select the datasource field whose value you want to access.

Datasource Variable Value
This dynamic value can be used to insert the value of a datasource variable. If you want to manually type in the dynamic value, you can use the following syntax:
[Datasource].[<name_of_datasource>].[Variable].[<name_of_variable>]
If you want to automatically insert the syntax for this dynamic value you can click the button in the expression editor and then click Datasource Variable Value. A new dialogue will appear which allows you to select the datasource variable whose value you want to access.

Datasource Expression
This dynamic value can be used to insert the return value of an expression which can be written in the syntax of the datasource used. If you want to manually type in the dynamic value, you can use the following syntax:
[Datasource].[<name_of_datasource>].[Expression].[<expression_code>]
If you want to automatically insert the syntax for this dynamic value you can click the button in the expression editor, then click Datasource Expression, and then click the name of the datasource for which you want to insert an expression. The code for the dynamic value will be inserted into the expression editor and you can immediately start typing the expression code in the syntax depending on your datasource. 
Example: You want to add the maximum value of the datasource field "Revenue" into the expression. The datasource used is a QlikView Document. If there is no datasource field or variable that contains the maximum value of "Revenue", you can choose to add a datasource expression and then use the syntax "[Datasource].[<datasource_name>].[Expression].[max(Revenue)]". The value between the last brackets can be any expression syntax that is supported by the type of datasource used.

Datasource Object Title 
This dynamic value can be used to insert the title of a datasource object. If you want to manually type in the dynamic value, you can use the following syntax:
[Datasource].[<name_of_datasource>].[ObjectTitle].[<object_id>]
If you want to automatically insert the syntax for this dynamic value you can click the button in the expression editor, then click Datasource Object Title, and then select the datasource object for which you want to insert an expression. The code will then automatically be inserted into the expression editor.

Report Parameter 
This dynamic value can be used to insert the value of a report parameter. This type of dynamic value is only available in expressions in the context of a report. If you want to manually type in the dynamic value, you can use the following syntax:
[ReportParameter].[<name_of_reportparameter>]
If you want to automatically insert the syntax for this dynamic value you can click the button in the expression editor, then click Report Parameter and then click the name of the report parameter whose value you want to insert.

Task Parameter
This dynamic value can be used to insert the value of a task parameter. This type of dynamic value is only available in expressions in the context of a task. If you want to manually type in the dynamic value, you can use the following syntax:
[TaskParameter].[<name_of_taskparameter>]
If you want to automatically insert the syntax for this dynamic value you can click the button in the expression editor, then click Task Parameter and then click the name of the task parameter whose value you want to insert.

Expression Parameter
This dynamic value can be used to insert the value of an expression parameter; expression parameters are additional parameters which are only available in certain contexts. If you want to manually type in the dynamic value, you can use the following syntax:
[<name_of_expressionparameter>]
If you want to automatically insert the syntax for this dynamic value you can click the button in the expression editor, then click Expression Parameter and then click the name of the expression parameter whose value you want to insert.

Cycle Value 
This dynamic value can be used to insert the current value of a cycle. This type of dynamic value is only available in expressions in the context of a cycle action. If you want to manually type in the dynamic value, you can use the following syntax:
[CycleValue].[<name_of_cyclevalue>]
If you want to automatically insert the syntax for this dynamic value you can click the button in the expression editor, then click Cycle Value and then click the name of the cycle value whose value you want to insert.

Colour 
This dynamic value can be used to insert colour. This type of dynamic value is only available certain contexts. If you want to automatically insert the syntax for this dynamic value you can click the button in the expression editor, then click Colour; a dialogue will appear in which you can configure the colour to insert.

Local Variables
This dynamic value can be used to insert the value of a local variable that has been previously set to a value. If you want to automatically insert the syntax for this dynamic value you can click the button in the expression editor, then click Local Variable; a dialogue will appear in which you can select the local variable to insert.

Global Variables 
This dynamic value can be used to insert the value of a global variable. If you want to automatically insert the syntax for this dynamic value you can click the button in the expression editor, then click Global Variable; a dialogue will appear in which you can select the global variable to insert.
Notes
Please note, that global variables are calculated every time you use them in expressions. If you reference a global variable multiple times, it will be evaluated for each of these references individually at the time of the evaluation.


Info
Looking for Additional Guidance?
If you require more detailed information or further assistance, please visit our comprehensive Online Documentation. Our resources are designed to help you navigate all features and functionalities effectively.






    • Related Articles

    • What are Constant Values in Mail & Deploy and how to use them?

      FIRST CREATED ON 17 May 2023 I AUTHOR Emma Camacho If you want to use a constant, non-calculated value in an expression, you can do this by using the following syntax, which depends on the data type of the constant you want to use. Text. If you want ...
    • How to use constant values and dynamic values in data types?

      FIRST CREATED ON 17 May 2023 I AUTHOR Emma Camacho Depending on the data-type of the constant value (see Constant Values) or dynamic value (see Dynamic Values), you can access certain properties of the value and/or manipulate it. Date-Time More ...
    • What are expressions in Mail & Deploy?

      FIRST CREATED ON 17 May 2023 I AUTHOR Emma Camacho In Mail & Deploy, expressions can be used to supply values to certain functions; expressions can either return constant values (see Constant Values), dynamic values (see Dynamic Values) or values ...
    • How to do Calculations in Mail & Deploy?

      FIRST CREATED ON 1 May 2020 I AUTHOR Emma Camacho The previously mentioned constant values (see Constant Values) and dynamic values (see Dynamic Values) can not only be used on their own, but they can be used in calculations by using the following ...
    • How to make use of Modules in Mail & Deploy?

      FIRST CREATED ON 17 May 2023 I AUTHOR Emma Camacho You can also write your own Visual Basic .NET code in a module. A module is a set of Visual Basic .NET code that contains functions to be used from any expression within the repository. This allows ...