Using expressions
In various parts of eformity, expressions can be used. Expressions consist of different components. In this article, we will cover everything about different expressions.
A
AsText
=Variables.AsText("Name")
Description
AsText returns the text value of a variable. This is absolute.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Enter the name of the variable. |
AsValue
=Variables.AsValue("Name")
Description
AsValue returns the value of a specific variable. This is absolute.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Enter the name of the variable. |
C
Choose
=Variables.Choose("Gender", "M;F", "Mr.;Mrs.", "Mr./Mrs.")
Description
Looks up a value in a list.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Enter the name of the variable. |
Lookup values | String | Value to be searched for, separated by a semicolon. |
Lookup values | String | Values returned if found in the lookup value. Separated by a semicolon. |
Lookup values | String | Returned if the value is not found. |
Contains
=Variables.Contains("Test")
=Variables.Contains("Test", "as")
Description
Checks if a variable exists.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Enter the name of the variable. |
Value (optional) | String | Enter the value you want to search within the variable value. |
E
Endwith
=Variables.EndWith("Name", "Value")
Description
Ensures a value always ends with the specified value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Enter the name of the variable. |
Value (optional) | String | Enter the value to end the variable value with. |
F
Format
=Variables.Format("Name", "", "{0}", "nl-nl")
Description
Formats a variable.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Enter the name of the variable. |
Default value | String | Value if the variable is not found. |
Formatting | String | The formatting of the variable. |
Language (optional) | String | Format language. |
G
GetValue
=Variables.GetValue("Name", "")
Description
Returns the value of a specific variable. This is relative.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Returns the value of a specific variable. This is relative. |
Default value | String | Returned if the variable is not found. |
GetText
=Variables.GetText("Name")
Description
Returns the text value of a variable. This is relative.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name |
H
HasValue
=Variables.HasValue("Name")
Description
Checks if the variable has a value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name |
Values (optional) | String | List of possible values separated by a comma or semicolon. |
I
IsAnyOf
=Variables.IsAnyOf("Name", "Value1;Value2")
Description
Checks if the value is one of the values in the list.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name |
Values | String | List of possible values separated by a comma or semicolon. |
IsEqual
=Variables.IsEqual("Name", "Motor")
Description
Compares if the variable is equal to the value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name |
Value | String | Value to compare the variable with. |
IsGreater
=Variables.IsGreater("Name", 5)
Description
Compares if the variable is greater than the value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name |
Value | Integer | Value to compare the variable with. |
IsGreaterOrEqual
=Variables.IsGreaterOrEqual("Name", 5)
Description
Compares if the variable is greater or equal to the value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Value | Integer | Value to compare the variable with. |
IsLess
=Variables.IsLess("Number", 5)
Description
Compares if the variable is less than the value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Value | Integer | Value to compare the variable with. |
IsLessOrEqual
=Variables.IsLessOrEqual("Name", 5)
Description
Compares if the variable is equal to or less than the value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Value | Integer | Value to compare the variable with. |
IsNotEqual
=Variables.IsNotEqual("Name", "Motor")
Description
Compares if the variable is not equal to the value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Value | String | Value to compare the variable with. |
IsNullOrEmpty
=Variables.IsNullOrEmpty("Name")
Description
Checks if the variable is an empty string.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
IsValueOf
=Variables.IsValueOf("Name", "Value1")
=Variables.IsValueOf("Name", "Value1;Value2")
Description
Checks if the variable's value matches any in the list of values.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Values | String | List of possible values separated by a comma or semicolon. |
J
Join
=Variables.Join("FirstName;MiddleName;LastName", ", ")
Description
Combines values using a separator (empty values are automatically skipped).
Parameters
Name | Type | Description |
---|---|---|
Names | String | Names of the variables separated by a semicolon (;). |
Separator | String | List of possible values separated by a comma or semicolon. |
End separator (optional) | String | Separator for the last value. |
JoinSelection
=Variables.JoinSelection("Checkbox1;Checkbox2;Checkbox3", "Value1;Value2;Value3", ", ")
Description
Combines values from a yes/no value using a separator (empty values are automatically skipped).
Parameters
Name | Type | Description |
---|---|---|
Names | String | Names of the variables separated by a semicolon (;). |
Values | String | Values separated by a semicolon (;). |
Separator | String | Separator for combining the values. |
End separator (optional) | String | Separator for the last value. |
L
Left
=Variables.Left("Name", 5)
Description
Extracts the leftmost characters from a variable value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Length | Integer | Number of characters to extract. |
Length
=Variables.Length("Name")
Description
Returns the length of a variable's value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
P
PadLeft
=Variables.PadLeft("Name", 10)
Description
Pads the text to the specified number of characters from the left.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Number | Integer | Number of characters to pad to. |
PadRight
=Variables.PadRight("Name", 10)
Description
Pads the text to the specified number of characters from the right.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Number | Integer | Number of characters to pad to. |
R
Replace
=Variables.Replace("CompanyName", "Eformity", "eformity")
Description
Finds and replaces text in a variable.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Search for | String | Text to search for. |
Replace with | String | Text to replace found text with. |
Right
=Variables.Right("Name", 5)
Description
Extracts the rightmost characters from a variable value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Length | Integer | Number of characters to extract. |
Round
=Variables.Round("Name", 2)
Description
The Round function rounds a variable to the specified number of decimal places.
Parameters
Name | Type | Description |
---|---|---|
Name | String | The name of the variable to be rounded. |
Decimal places | Integer | The number of decimal places to round to. |
S
StartsWith
=Variables.StartsWith("Name", "Value")
Description
Checks if the variable value starts with the specified value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Value | String | Value to check for. |
Substring
=Variables.Substring("Name", 0, 5)
Description
Extracts a substring from a variable value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Index | Integer | Starting index. |
Length | Integer | Number of characters to extract. |
T
ToBase64
=Variables.ToBase64("Name")
Description
Encodes the variable value to Base64.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
ToLower
=Variables.ToLower("Name")
Description
Converts the variable value to lowercase.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
ToUpper
=Variables.ToUpper("Name")
Description
Converts the variable value to uppercase.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
Trim
=Variables.Trim("Name")
Description
Trims spaces from the variable value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
TrimEnd
=Variables.TrimEnd("Name")
Description
Trims spaces from the end of the variable value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |
TrimStart
=Variables.TrimStart("Name")
Description
Trims spaces from the start of the variable value.
Parameters
Name | Type | Description |
---|---|---|
Name | String | Variable name. |