Expressions

Expressions are small pieces of code that can be embedded into some object properties. For example: you can dynamically generate data storage name that depends on project name or current date, build capture expressions that combine several data from other captures, etc.

Typical expression is a string with an expression inside $. The application provides several variables that can be accessed inside expression. These variables are described in separate chapter

Usage

Data Storage

The expressions are really useful in file name generation. The expression is evaluated during data storage initialization. Also the expressions are available in Image Downloader and File Downloader data processors to parametrize output folders.

Suppose we have project Advanced Project that contains agent Agent1 and GLOBAL_DATA_DIR points to C:/Projects/Data folder. We can set expression in Output File property in most data storages.

${GLOBAL_DATA_DIR}/${PROJECT_NAME}/${AGENT_NAME}.csv - generates file name that based on global data dir, project name and agent name.

C:/Projects/Data/Advanced Project/Agent1.csv

${GLOBAL_DATA_DIR}/${PROJECT_NAME}${n}.csv - generates file name that are based on global data directory and project name. If the file already exists - append number to the file name to make it unique in the target folder.

C:/Projects/Data/Advanced Project.csv
C:/Projects/Data/Advanced Project1.csv
C:/Projects/Data/Advanced Project2.csv
...

${GLOBAL_DATA_DIR}/${PROJECT_NAME}${N}.csv - similar to previous expression, but always add number.

C:/Projects/Data/Advanced Project1.csv
C:/Projects/Data/Advanced Project2.csv
C:/Projects/Data/Advanced Project3.csv
...

${GLOBAL_DATA_DIR}/${PROJECT_NAME}${DD}${MM}_${YYYY}.csv - generates file name that is based on current date.

Expressions are also available for Excel Sheet Name property.

Sheet${N} - generates unique sheet name for the existing spreadsheet.

Sheet1
Sheet2
Sheet3
...