Constant values

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 to write a text constant, the following syntax may be used:

"Hello World!"


Number.

If you want to write a numeric constant, the following syntax may be used:

2018

Date. 

If you want to write a date constant, the following syntax may be used:

#2018-12-31#


For instance, if you simply want the expression to return the number 2018, the expression looks like this:

2018

If you want the expression to return the text Hello World, the expression looks like this:

"Hello World"


Inserting Constant Values 

In some cases, you do not want to type a constant value but rather pick it from a list of values which is offered by Mail & Deploy. 

Example: You want to activate a bookmark with a specific name in a datasource (see Activate Datasource Bookmark Action). You can either type the name of the bookmark as a text constant, or you can choose to insert the constant value, where you will be able to pick the name of the bookmark from a list.


You can insert constant values by clicking the button in the expression editor and then choosing a constant value type of your choice; however, not all the constant values listed below are available at all times; some of them are only available if the context in which the expression is used allows it.

Datasource Bookmark Name. 

If you choose this option, a new dialogue will appear that allows you to pick one of the bookmarks (see Bookmarks) of one of the datasources (see Datasources). If you then click the button , a constant value will be inserted into the expression that equals the name of the selected bookmark.


Datasource Embedded Report Name. 
If you choose this option, a new dialogue will appear that allows you to pick one of the embedded reports (see Embedded Reports) of one of the datasources (see Datasources). If you then click the button , a constant value will be inserted into the expression that equals the name of the selected embedded report.

Horizontal Alignment.

If you choose this option, you can select a horizontal alignment; a constant value will be inserted into the expression that equals the selected horizontal alignment. This constant value is not always available.

Vertical Alignment.

If you choose this option, you can select a vertical alignment; a constant value will be inserted into the expression that equals the selected vertical alignment. This constant value is not always available.

Line Type. 

If you choose this option, you can select a line type; a constant value will be inserted into the expression that equals the selected line type. This constant value is not always available.

Printer Name.

If you choose this option, a new dialog will appear that allows you to pick one of the printers that is installed on the computer that runs Mail & Deploy Server (see Server). If you then click the button , a constant value will be inserted into the expression that equals the name of the selected printer.

T
Team is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.