Table of Contents

Search

  1. Preface
  2. Informatica Managed File Transfer Welcome Overview
  3. Dashboard
  4. Resources
  5. Workflows
  6. Task Reference
  7. Services Overview
  8. Users
  9. Logs and Reports
  10. Encryption
  11. System
  12. Appendix
  13. Glossary Terms

Expression Syntax

Expression Syntax

Below is a list of items that are allowed in expressions.
Item
Usage
Example
Variables
A variable refers to a value which may be a number, string or object. Multiple variables can be contained within one expression or function.
${x} - Returns the value of variable "x"
${x + y} - Returns the result of variable "x" added to variable "y". Both variables must contain a numeric value.
${x + 2} - Returns the result of variable "x" added to 2
${concat(x,y)} - Returns the combined string values from variables x and y
RowSet Values
RowSet values can be accessed by placing the column name or column number inside of [ ] (square brackets). Column names must be placed inside double or single quotes. Additional functions, equations and other expressions can be placed in the square brackets.
${data[1]} - Returns the value of the first column
${data[x]} - Returns the value of the column with a name contained in the variable "x"
${data[‘columnName’]} - Returns the value of the column with a name of "columnName"
${data[length(x)]} - Returns the value of the column with an index that is the length of variable "x"
Keywords
The following keywords are reserved for use by expressions and cannot be used as variable names in
Managed File Transfer
:
  • true
  • false
  • and
  • or
  • ne
  • eq
  • gt
  • lt
  • le
  • ge
  • not
  • null
  • if
  • else
  • elseif
  • break
  • continue
  • do
  • while
  • dowhile
  • for
  • foreach
  • try
  • catch
${contains(‘x’,’x’,false)} - False does not need quotes and will not be interpreted as a variable since it is a reserved keyword representing a boolean value.
${x == true} - Returns if the variable "x" is equal to true. The keyword true does not need quotes and will not be interpreted as a variable.
${data[1] == null} - Returns true if the first column in the RowSet is null.
Method Calls
Method Calls are way to retrieve additional METADATA for a variable. To call a method, insert a colon and the method name immediately after the variable name. Each variable type (File List, Local File, Email List, etc) provides a different set of methods that are available. Refer to the Variables topic for a complete list of methods that are available for each variable type.
${FileInfo(“C:\file.txt”):size} - The FileInfo function returns the size of the specified file.
Grouping
Parentheses can be placed in expressions to determine the order of precedence.
${x+(2-1)} - Calculates the equation in parentheses first before adding it to the variable "x"
${(x >= 0 || y >= 0) && z == 'enabled'} - Returns true if "x" or "y" are greater than zero and "z" is equal to "enabled"
Functions
A function is declared by placing parentheses after the function name. If parameters are needed, they should be placed inside the parentheses and must be separated by commas. Each parameter can contain additional functions, equations, strings, variables and any other expression value.
${Substring('text', 3)} - Returns the value "xt" from the Substring function
${Concat('x','y','z')} - Returns the value "xyz" from the Concat function
${Length(Concat('x', 'y', 'z'))} - Returns the value 3 as the Concat function passed in "xyz" to the Length function
Strings
Any text that is enclosed in single or double quotes is treated as a string value.
If a string is enclosed with double quotes and a double quote is needed in the string value, it must be escaped by another double quote. If the string is enclosed in single quotes and a single quote is needed in the string value, it must be escaped by another single quote.
${x == 'enabled'} - Returns true if the variable "x" equals the string value 'enabled'
${x == "enabled"} - Returns true if the variable "x" equals the string value "enabled"
${length(“x"”x")} - Returns the value 3 since the double quote in the middle is escaped and resolves to one double quote.
${length('x''x')} - Returns the value 3 since the single quote in the middle is escaped and resolves to one single quote.
${length('x""x')} - Returns the value 4 as the double quotes in the middle are not escaped since the string is enclosed with single quotes.
${length("x''x")} - Returns the value 4 as the single quotes in the middle are not escaped since the string is enclosed with double quotes.
Numbers
An expression may contain whole numbers, decimals or numbers written in scientific notation. Numbers can optionally be formatted with patterns by using the FormatNumber(number, pattern) function.
${10.00} - Represents the value 10.00
${2e2} - Represents the value 200
${3.820954E6} - Represents the value 3820954
${FormatNumber(3820, '#,###')} - Returns the value 3,820 as a string
Math Operators
Valid math operators are:
+
Addition
-
Subtraction
*
Multiplication
/
Division - When dividing numbers that result in a decimal value, the maximum number of digits to the right of the decimal point is 16.
%
Returns the remainder after the first operand is divided by the second operand.
^
Raises the first operand to the power of the second operand.
Expressions containing more than one mathematical step will calculate exponents, multiplication and division before addition and subtraction.
${1+5-3*4/2} - Returns the value 0
${2^3} - Returns the value of 2 taken to the power of 3
${10%3} - Returns the value 1
Logical Operators
Multiple conditions can be separated with the logical operators AND (&&) and OR (||). The AND operator requires both sides to evaluate to true. If the first operand evaluates to false the second operand is not evaluated. The OR operator requires that either side evaluates to true. If the first operand evaluates to true the second operand is not evaluated.
${(x == y) || (1+1 eq 2)} - Returns true as the second parameter is true
${true || EndsWith(x,'csv')} - The EndsWith function is not called because the first operand is evaluated to true and meets the condition.
${(x+y==y+x) && (1+1 eq 2)} - Returns true as both sides evaluate to true
Comparison Operators
Both string and symbolic operators are supported.
== or eq
Equals
<> or ne
Not Equal
< or lt
Less Than
>or gt
Greater Than
<= or le
Less Than or Equal to
>= or ge
Greater Than or Equal to
${x == x} - Returns "true" as the left operand  equals the operand on the right
${1+1 eq 2} - Returns "true" as the result of the left operand equals the value of the right operand

0 COMMENTS

We’d like to hear from you!