### Mail & Deploy Silent Installation Command Source: https://help.mail-and-deploy.com/docs/installing-mail-deploy Example command for a silent installation of Mail & Deploy with various parameters. ```bash "Mail & Deploy Setup.exe" silent mode="install" path="" language="" httpport="" saname="" sapassword="" admintype="" adminname="" adminpassword="" activationcode="" erroroutputpath="" ``` -------------------------------- ### Example Usage Source: https://help.mail-and-deploy.com/docs/activate-culture This example shows how to activate the 'en-US' culture and then format the current date using the short date format specifier. ```text Mail & Deploy Expression Format(Date.Today, "d") ``` -------------------------------- ### Theme Property Example Source: https://help.mail-and-deploy.com/docs/activate-datasource-theme Example of an expression for the Theme property when the theme identification is 'sense'. ```Mail & Deploy Expression "sense" ``` -------------------------------- ### ConvertToText Function Example Source: https://help.mail-and-deploy.com/docs/converttotext This example shows how to use ConvertToText to get the string value of a variable from a datasource. ```Expression ConvertToText([Datasource].[MyDatasources].[Variable].[vTest]) ``` -------------------------------- ### Capitalize Function Example Source: https://help.mail-and-deploy.com/docs/capitalize This example demonstrates how to use the Capitalize function to capitalize the first letter of each word in the string 'hello world'. ```expression Capitalize("hello world") ``` -------------------------------- ### Qlik Sense Load Script Example Source: https://help.mail-and-deploy.com/docs/dynamic-cultures Example of setting default thousands and decimal separators in a Qlik Sense load script. ```qlikview SET ThousandSep=','; SET DecimalSep='.'; ``` -------------------------------- ### CreateList Function Example Source: https://help.mail-and-deploy.com/docs/createlist Returns a List that contains the Strings Hello and World. ```text CreateList("Hello", "World") ``` -------------------------------- ### Datasource Object Title Placeholder Example Source: https://help.mail-and-deploy.com/docs/datasource-object-title An example demonstrating how to access the title of a Datasource object. ```text "Hello " & [Datasource].[Sales Data].[ObjectTitle].[JZMrdb] ``` -------------------------------- ### AddDays function Source: https://help.mail-and-deploy.com/docs/date-time Example of using the AddDays function to get yesterday's date. ```Mail & Deploy Expression Date.Today.AddDays(-1) ``` -------------------------------- ### ConvertToDate Function Example Source: https://help.mail-and-deploy.com/docs/converttodate An example of using the ConvertToDate function to convert a variable's value to a Date-Time. ```text ConvertToDate([Datasource].[MyDatasources].[Variable].[vTest]) ``` -------------------------------- ### Datasource Variable Value Placeholder Example Source: https://help.mail-and-deploy.com/docs/datasource-variable-value An example demonstrating how to access a specific datasource variable and concatenate it with a string. ```plaintext "Hello " & [Datasource].[Sales Data].[Variable].[Sales Rep Name] ``` -------------------------------- ### AddMonths function Source: https://help.mail-and-deploy.com/docs/date-time Example of using the AddMonths function to get the date from one month ago. ```Mail & Deploy Expression Date.Today.AddMonths(-1) ``` -------------------------------- ### EncodeUri Function Example Source: https://help.mail-and-deploy.com/docs/encodeuri The following Expression returns a String that contains Hello+World: ```N/A EncodeUri("Hello World") ``` -------------------------------- ### CreateList Function Example Source: https://help.mail-and-deploy.com/docs/createlist Returns a List that contains the Numbers 1 and 3. ```text CreateList(1, 3) ``` -------------------------------- ### Example 3: List of Stores Source: https://help.mail-and-deploy.com/docs/evaluatedaxordmvdatasourceexpression Returns a list of Stores in the database. ```PowerBI EvaluateDaxOrDmvDatasourceExpression("M&D Demo_Sales & Returns Sample", "EVALUATE SUMMARIZECOLUMNS('Store'[Store])", 2) ``` -------------------------------- ### Execute Mail & Deploy Expression Source: https://help.mail-and-deploy.com/docs/execute-code This example shows how to call a function named 'WriteDebugFile' from a Global Module, passing 'Hello World' as a string parameter. ```Mail & Deploy Expression WriteDebugFile("Hello World") ``` -------------------------------- ### Concat Function Example Source: https://help.mail-and-deploy.com/docs/concat Does the same but puts every value into a line of its own. ```text Concat(NewLine(), [Datasource].[Consumer Sales].[Field].[SalesRepName]) ``` -------------------------------- ### Mail & Deploy Silent Setup Source: https://help.mail-and-deploy.com/docs/updating-mail-deploy Command-line syntax for silently updating Mail & Deploy. ```bash "Mail & Deploy Setup.exe" silent mode="update" ``` -------------------------------- ### Capitalize Function Example with Datasource Field Source: https://help.mail-and-deploy.com/docs/capitalize This example shows how to use the Capitalize function to capitalize the first letter of the 'SalesRepName' field from the 'Consumer Sales' Datasource. ```expression Capitalize([Datasource].[Consumer Sales].[Field].[SalesRepName]) ``` -------------------------------- ### Datasource Field Value Placeholder Example Source: https://help.mail-and-deploy.com/docs/datasource-field-value An example of accessing the 'Sales Rep Name' field from the 'Sales Data' Datasource, assuming the data model is filtered to a single value. ```qlik "Hello " & [Datasource].[Sales Data].[Field].[Sales Rep Name] ``` -------------------------------- ### Example 2: Collection of rows from a table Source: https://help.mail-and-deploy.com/docs/evaluatedaxordmvdatasourceexpression Returns a collection of rows from a table containing recipients for a report. The example also shows how to access values within a cycle group. ```PowerBI EvaluateDaxOrDmvDatasourceExpression( "M&D Demo_Supporting Report", "EVALUATE 'Store Managers' ", 1 ) ``` -------------------------------- ### Concat Function Example Source: https://help.mail-and-deploy.com/docs/concat Returns a String that contains all values of the field SalesRepName of a Datasource named Consumer Sales separated by a comma and a whitespace. ```text Concat(", ", [Datasource].[Consumer Sales].[Field].[SalesRepName]) ``` -------------------------------- ### Example 2: Retrieving a list of region names Source: https://help.mail-and-deploy.com/docs/evaluatesqldatasourceexpression This expression returns a list of region names from the database. ```text EvaluateSqlDatasourceExpression("Snowflake", "SELECT REGION_NAME FROM REGION", 2) ``` -------------------------------- ### Constant date-time values Source: https://help.mail-and-deploy.com/docs/date-time Examples of how to represent constant date-time values in Mail & Deploy Expression. ```Mail & Deploy Expression #8/13/2002 12:14 PM# ``` ```Mail & Deploy Expression #8/13/2002# ``` -------------------------------- ### Accessing current date-time and date Source: https://help.mail-and-deploy.com/docs/date-time Expressions to get the current date-time and current date. ```Mail & Deploy Expression DateTime.Now ``` ```Mail & Deploy Expression Date.Today ``` -------------------------------- ### CreatePassword Function Example Source: https://help.mail-and-deploy.com/docs/createpassword The following Expression returns a String that contains a random password with 20 alphanumeric characters: ```javascript CreatePassword(20) ``` -------------------------------- ### Example 1: Count of tracks by Artist Source: https://help.mail-and-deploy.com/docs/evaluatedaxordmvdatasourceexpression Returns the count of tracks by the Artist specified in the Report Parameter Artist. Typically used in an Expression Element. ```PowerBI EvaluateDaxOrDmvDatasourceExpression( "Music PowerBI", "EVALUATE ROW ( \"RowCount\", CALCULATE ( DISTINCTCOUNT('music_data'[track_name]), 'music_data'[artist(s)_name] = \"" & [ReportParameter].[Artist] &"" ) )" , 0) ``` -------------------------------- ### Cycle Over Values Source: https://help.mail-and-deploy.com/docs/cycle This code snippet demonstrates how to set the Source property to _Expression_ and use an Expression in the _Values_ property to perform a cycle over the numeric values 1, 2, and 3. ```text Value Expression CreateList(1, 2, 3) ``` -------------------------------- ### EvaluateDatasourceExpression Function Example Source: https://help.mail-and-deploy.com/docs/evaluatedatasourceexpression The following Expression returns 2024. ```text EvaluateDatasourceExpression("Executive Dashboard", "year(makedate(2024,1,1))") ``` -------------------------------- ### ConvertToDate Function Syntax Source: https://help.mail-and-deploy.com/docs/converttodate The syntax for using the ConvertToDate function. ```text ConvertToDate() ``` -------------------------------- ### Condition Element Tags Source: https://help.mail-and-deploy.com/docs/condition-elements-5 Syntax for the start and end tags of a condition element. ```template [[]] [[/]] ``` -------------------------------- ### Expression Returning User Name(s) Source: https://help.mail-and-deploy.com/docs/distribute-report-document-to-library This expression returns a list of two user names. ```Mail & Deploy Expression CreateList("Bob", "Sue") ``` -------------------------------- ### ConvertToBoolean Function Example Source: https://help.mail-and-deploy.com/docs/converttoboolean The following Expression returns the value of the variable vTest of Datasource MyDatasource as a boolean: ```text ConvertToBoolean([Datasource].[MyDatasources].[Variable].[vTest]) ``` -------------------------------- ### ConvertToNumber Function Example Source: https://help.mail-and-deploy.com/docs/converttonumber The following Expression returns the value of the variable vTest of Datasource MyDatasource as Number. ```text ConvertToNumber([Datasource].[MyDatasources].[Variable].[vTest]) ``` -------------------------------- ### Datasource Object Visitor URL Placeholder Syntax Source: https://help.mail-and-deploy.com/docs/datasource-object-visitor-url The syntax for referencing the Visitor URL of a Datasource object in an Expression. ```plaintext [Datasource].[].[VisitorURL].[] ``` -------------------------------- ### ConvertToDateTime Function Example Source: https://help.mail-and-deploy.com/docs/converttodatetime The following Expression returns the value of the variable vTest of Datasource MyDatasource as Date-Time. ```Liquid ConvertToDateTime([Datasource].[MyDatasources].[Variable].[vTest]) ``` -------------------------------- ### Datasource Object Title Placeholder Syntax Source: https://help.mail-and-deploy.com/docs/datasource-object-title The general syntax for the Datasource Object Title placeholder. ```text [Datasource].[].[ObjectTitle].[] ``` -------------------------------- ### Expression Returning User E-Mail Address(es) Source: https://help.mail-and-deploy.com/docs/distribute-report-document-to-library This expression returns a list of two e-mail addresses. ```Mail & Deploy Expression CreateList("user123@company.com", "user456@company.com") ```