Salesforce

Functions List (Magic xpi 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Functions List (Magic xpi 3.x)

Using Functions

In Magic xpi you can use functions as part of a condition or a formula for computing a value. A condition’s value can be Numeric (including Date and Time), String, or Logical (TRUE or FALSE). The expression consists of a sequence of operators indicating the action to be performed, and operands on which the operation is performed. Operands may contain variables, functions, constants (called literals), or other sub-expressions.

A function usually contains one or more arguments, delimited by commas. The arguments are enclosed in parentheses. Even if the function contains no arguments it still requires a set of parentheses: for example, Date (). Every function returns a value. You can enter any arithmetic expression that follows conventional algebraic rules, or a string or a logical expression.

Operators can be numeric (for example, '+'), string (for example, '&'), or logical (for example, "NOT").

Functions can be nested to any level using parentheses. For example, the following expression gives the real length of the string stored in the variable A:

Len(LTrim(RTrim(A)))

Further complexity is possible by nesting logical expressions, including IF, AND, NOT, and OR.

In the Expression Editor, each function has its own tooltip that describes its signature. You can also highlight a particular function in the list, and press F1 to access its Help page.

Note:

  • All string functions can work with BLOBs. They can therefore be used with the Flow Data service and with the Data Mapper.

  • In all functions, the parameters should be of the type described or be evaluated to that type. For example, BlobToBase64(BLOB blob) can be used in the following ways:

  • By setting a BLOB variable. For example, BlobToBase64(‘<?xml version="1.0" encoding="UTF-8"?>’).

  • By an expression that is evaluated to a numeric value. For example, ABS(C.Name1) where C.Name1 is a BLOB variable.

Reference
Attachment 
Attachment