Welcome to our functions guide!
This guide is designed to help you navigate and understand the functions available in Engini’s workflows.
So let’s get started and explore the power of functions.
Logical functions #
Trim function #
Trim(<text>, <string of chars>?)
Removes all leading and trailing occurrences of a set of characters specified in second parameter (by default is white spaces) from the current string.
For example, Trim(“%%ABC”, “%”) – Output will be “ABC”.
AND function #
And (<expression1>, <expression2>, …)
Tests whether two or more conditions are true. It returns a value of TRUE if all conditions are met, and FALSE if one or more condition is not met.
For example, And (Equal (X ,Y), Greater(X,Z)) – Output will be TRUE if all conditions are met: X equals to Y AND X Greater than Z, otherwise FALSE.
OR function #
Or(<expression1>, <expression2>, …)
Tests whether one or more condition are true. Returns a value of TRUE if at least one condition is met, and FALSE if all conditions aren’t met.
For example, OR (Equal (X ,Y), Greater(X,Z)) – Output will be TRUE if at least one condition is met: X equals to Y OR X greater than Z, otherwise FALSE
IF function #
If (<expression>, <value if true>, <value if false>)
Check whether an expression is true or false. Based on the result, return a specified value.
For example, If (Equal (5 ,6),”Yes”,”No”) checks if 5 equals to 6, If it is, the output will be “Yes’, otherwise it will be “No”. Since it’s false, the output in this exmple will be “No”.
Greater function #
Greater(<value>, <compareTo>)
Compares two values and determine whether the first value is greater than the second value. The function returns a value of TRUE if the first value is greater than the second value, and FALSE otherwise.
For example, Greater (12,9) checks if 12 greater than 9, If it is, the output will be True, otherwise it will be False. Since it’s true, the output of this function will be True.
GreaterOrEquals function #
GreaterOrEquals(<value>, <compareTo>)
Compares two values and determine whether the first value is greater than or equal to the second value. The function returns a value of TRUE if the first value is greater than or equal to the second value, and FALSE otherwise.
For example, GreaterOrEquals (12,12) checks if 12 is greater than or equal to 12. If it is, the output will be ‘True’; otherwise, it will be ‘False.’ Since in this example it’s true, the output of this function will be ‘True’.
Less function #
Less(<value>, <compareTo>)
Compares two values and determine whether the first value is less than the second value. The function returns a value of TRUE if the first value is less than the second value, and FALSE otherwise.
For example,Less (12,9) checks if 12 is less than 9, If it is, the output will be True, otherwise it will be ‘False’. Since in this example it isn’t, the output of this function will be ‘False’.
LessOrEqual function #
LessOrEquals(<value>, <compareTo)
Compares two values and determine whether the first value is less than or equal to the second value. The function returns a value of TRUE if the first value is less than or equal to the second value, and FALSE otherwise.
For example, LessOrEquals (12,12) checks if 12 is less than or equal to 12. If it is, the output will be ‘True’; otherwise, it will be ‘False.’ Since in this example it is, the output of this function will be ‘True’.
Switch function #
Switch(<expression>, <value1>, <result1>, [<default>or<value2>, <result2>], …[<default>or<value3>, <result3>])
Evaluates the expression result against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value may be returned.
For example, Switch (Level Property ,1,”Low”,2,”Moderate”,3,”High”) checks if the level is 1, 2, or 3 and returns the corresponding result (‘Low,’ ‘Moderate,’ or ‘High’).
NOT function #
Not(<expression>)
Returns TRUE if the expression result is false, and FALSE if the expression result is true.
For example, Not (Greater (5, 1)) checks if 5 is not greater than 1. If it’s not greater, the output will be ‘True’; otherwise, it will be ‘False.’ Since in this example it’s ‘False,’ the output of this function will be ‘False.’
Equal function #
Equal(<expression1>, <expression2>)
Tests whether two values are equal to each other. returns a TRUE if the two values are equal, and FALSE if they are not.
For example, Equal(5, 5) checks if 5 is equal to 5. If they are equal, it returns ‘True’; otherwise, it returns ‘False.’ Since in this example they are equal, the output will be ‘True’.
IsNull function #
IsNull(<expression>, <alternateResult>?)
This function serves two purposes: It returns true if the expression is null, and false otherwise. Additionally, if an alternate result is provided, the function checks if the expression is null; if it is, the function returns the alternate result value. If the expression is not null, it returns the expression value.
For example, IsNull(Engini, “123”) will check if the property Engini is null. If it is null, the function will return “123”. If Engini is not null, it will return the value of Engini.
Null function #
Null()
Returns null.
IN function #
In(<expression>, [<compareTo1>, …, <compareToN>])
The function returns TRUE if the first argument contained in the array of values in the second argument, and FALSE otherwise.
For example, In(“John”,Employees[]) checks If ‘John’ exists in the array of Employees, if he is in the array, the function returns true; otherwise, it returns false. In this case, as John exists in the array of Employees, the output will be ‘True’.
TryParse function #
TryParse(<expression>, <defult>)
If the expression is successfully parsed, it returns its calculated result. otherwise, returns the supplied default value.
For example, TryParse(‘100’, ‘null’) attempts to parse the string ‘100’ as an integer. If the parsing operation succeeds, the output of the function will be 100. However, if the parsing fails, the function returns a null value.
Mathematical functions #
Add function #
Add(<expression1>, <expression2>)
Combines two or more values, or expressions numeric result and produce a sum. Unlike the sum function, the add function cannot accept an array.
For example, Add (1,2) adds the value ‘1’ to the value ‘2’, so the output will be 3.
Sub function #
Sub(<minuend>, <subtrahend>)
Returns the result from subtracting the values or expressions numeric results.
For example, Sub (2,1) subtracts the value ‘1’ from the value ‘2’, so the output will be 1.
Divide function #
Divide (<numerator>, <denominator>, [<alternateresult>])
Returns the result from dividing arguments. If the function tries to divide by 0 than it will return the alternate result.
For example, Divide (10, 5) divides 10 by 5 and returns the value 2.
Multiply function #
Multiply(<multiplicand1>, <multiplicand2>)
Returns the result of multiplying two or more values or expressions numeric results.
For example, Multiply (8, 8) multiplies 8 by 8 and returns the value 64.
Sum function #
Sum(<array1>, [<array2>, …])
Finds the total of two or more values or expressions numeric result in an array. The function can receive more than one array.
For example, Sum([1,2,3] ,[4,5,6]) sums all the elements in both arrays. The output of the function will be 21.
Max function #
Max(<array1>or<number1>, <number2>, …)
Returns the largest value of a set of numbers or in a specified array.
For example, Max (101, 55) returns the largest value, so the output will be 101.
Min function #
Min(<array1>or<number1>, <number2>, …)
Returns the smallest value of a set of numbers or in a specified array.
For example, Min (101, 55) returns the smallest value, so the output will be 55.
Mod function #
Mod(<numerator>, <denominator>, [<alternateresult>])
Short for “modulus” or “modulo”. Returns the remainder from dividing the two values or expressions numeric results or alternate result when the denominator is zero.
For example, if we perform the operation mod (7, 3, 0), we get a result of 1 because 7 divided by 3 equals 2 with a remainder of 1.
Round function #
Round(<decimal>,<number_of_digits>)
Rounds a number to the nearest integer or to a specified number of decimal places.
For example, Round (number = 0.2333333, number of digits=3), returns the number 0.233.
RoundUp function #
RoundUp(<decimal>,<number_of_digits>)
Rounds a number up to the nearest integer or a specified number of decimal places.
For example, if we have the number 3.14, and we want to round it up to the nearest integer (number = 0), the round-up function would return 4, as it is the next highest integer value.
RoundDown function #
RoundDown(<decimal>, <number_of_digits>)
Rounds a number down to the nearest integer or a specified number of decimal places.
For example, if we have the number 3.99, and we want to round it down to the nearest integer (number = 0), the round-down function would return 3, as it is the next lowest integer value.
ToInt function #
ToInt(<expression>,<default>?)
Converts specific expression to an integer value. If the conversion was not successful returns the default value.
For example, if we have the expression 3.0 and we want to convert to integer, the ToInt function would return 3.
ToBool function #
ToBool(<expression>,<default>?)
Converts specific expression to an boolean value. If the conversion was not successful returns the default value.
For example, if we have the text “true” and we want to convert to boolean value, the ToBool function would return true.
ToDecimal function #
ToDecimal(<expression>, <default>?)
Converts a specific expression to a decimal value. If the conversion is not successful, it returns the default value.
For example, if you have the text “123.45” and want to convert it to a decimal value, the ToDecimal function would return 123.45.
RandomInteger function #
RandomInteger(<min>,<max>)
Generates a random integer between the specified minimum (min) and maximum (max) values, inclusive. The min value must be greater than or equal to 0, and the max value must be less than or equal to 2147483647.
For example, if you provide min = 1 and max = 6, the RandomInteger function will return a random integer like: 4.
Text functions #
Concat function #
Concat(<text1>, <text2>, …)
Combines two or more strings, or expression text results into a single string. The concat function does not modify the original strings. Instead, it returns a new string that is the result of the concatenation.
For example, Concat(“Hello”,” world”) combines the two strings together, and the output will be ‘Hello world’
Replace function #
Replace(<text>, <oldText>, <newText>)
Replaces one or more occurrences of a substring in a string with a new substring. The replace function does not modify the original string; it returns a new string after the replacements made. The function takes three arguments: the original string, the substring to be replaced, and the new substring to replace it with.
For example, Replace (“The guide is full of examples”, “examples”, “samples”) replaces the word “examples” to “samples” in the text, so the output will be ‘The guide is full of samples’.
SubString function #
SubString(<text>, <startIndex>, <length>?)
Extracts a portion of a string and return it as a subset of characters.
The substring function takes three arguments: the text, the starting index of the substring, and the length (optional). If the length is not specified, the substring will include all characters from the starting index to the end of the string.
Note that the index count starts at 1(not 0).
For example, SubString (“Hello, World!”,8,5) extracts a substring from the text “Hello, World!” starting at the 8th character (which is ‘W’) and including the next 5 characters. The result will be “World,”.
Slice function #
Slice(<text>, <startIndex>, <endindex>?)
Extracts a portion of a string and return it as a new string. It works similarly to the substring function, but it has some differences in the way it handles the arguments.
The slice function takes three arguments: the text, the starting index of the slice, and the ending index of the slice (optional). If the ending index is not specified, the slice will include all characters from the starting index to the end of the string.
Note that the index count starts at 1(not 0).
For example, Slice (‘Hello, World!’,7,12) extracts a slice from the text “Hello, World!” starting at the 7th character (which is ‘W’) and ending at the 12th character (which is ‘d’). The result will be ‘World’.
ToLower function #
ToLower(<text>)
Converts a string to lowercase letters and returns the new string. The original string is not modified.
For example, ToLower(“The Guide is Full of Examples”) converts the string “The Guide is Full of Examples ” to lowercase letters, and the result will be ” the guide is full of examples “.
ToUpper function #
ToUpper(<text>)
Converts a string to uppercase letters and returns the new string. The original string is not modified.
For example, ToUpper(“The Guide is Full of Examples”) converts the string “The Guide is Full of Examples ” to uppercase letters, and the result will be ” THE GUIDE IS FULL OF EXAMPLES “.
IndexOf function #
Indexof(<text>, <searchtext>)
Returns the first index of a value within a string (case- insensitive).
Note that the index count starts at 1(not 0).
For example ,IndexOf(“The Guide is Full of Examples”, “Guide”) searches for the first occurrence of the search text, “Guide,” within the given string, “The Guide is Full of Examples”. The result will be the index of the first occurrence, which in this case is 5.
NthIndexOf function #
NthIndexOf(<text>, <searchtext>, <occurrence>)
Returns the index of the n-th occurrence of a value within a string (case- insensitive).
Note that the index count starts at 1(not 0).
For example, NthIndexOf(‘SaaS is defined as Software as a Service’,’as’,2) returns 28 because it’s the index of the second occurrence of ‘as’ in the string.
LastIndexOf function #
LastIndexOf(<text>, <searchtext>)
return the last index of a value within a string (case- insensitive).
Note that the index count starts at 1(not 0).
For example, LastIndexOf(“SaaS is defined as Software as a Service”, “as”) returns 29 because it’s the index of the last occurrence of “as” in the string.
StartsWith function #
StartsWith(<text>, <searchtext>)
Checks if a string starts with a value (case- insensitive). returns TRUE if the string starts with value, and FALSE otherwise.
For example, StartsWith(“Hello, world!”, “Hello”) returns ‘True’ because the string “Hello, world!” starts with “Hello”.
EndsWith function #
EndsWith(<text>, <searchtext>)
Checks if a string ends with a value (case- insensitive). returns TRUE if the string ends with value, and FALSE otherwise.
For example, EndsWith(“Hello, world!”, “Engini”) returns ‘False’ because the string “Hello, world!” ends with “world”.
Length function #
Length(<text>)
returns the length of a given text string.
For example, Length(“A guide”) returns the number ‘7’ because the string has 7 characters.
UrlDecode function #
UrlDecode(<text>)
Takes a string that has been URL-encoded, converts it back to its original form and returns it.
For example, UrlDecode(‘Hello%20world%21’) decodes the URL-encoded string “Hello%20world%21” and returns ‘Hello world!’.
UrlEncode function #
UrlEncode(<text>)
Takes a string, converts it into a format that can be safely included in a URL and returns this format.
For example, UrlEncode(‘Hello world!’) encodes the string ‘Hello world!’ into a URL-safe format and returns “Hello+world!”.
Split function #
Split(<text>, <separator>)
Splits a string into an array of substrings based on a specified delimiter character or substring.
For example, Split(“Abi, Yuval, Haim”, “,”) takes an input string ‘Abi, Yuval, Haim’ and creates an array of strings. The output will be:
[
“Avi”,
“jubilee”,
“Haim”
]
NewLine function #
NewLine ()
Returns new line character, it is used to create a new line in text, (in ASCII, ‘\r\n’).
For example, Concat(“Saas”, NewLine(),”SaaS is defined as Software as a Service”). As you can see, the NewLine function inserts a newline character, creating a line break in the resulting text. The output is:
Saas
SaaS is defined as Software as a Service
ToString function #
ToString(<expression>)
Convert any expression to string.
For example, ToString(789) converts the integer 789 to string, the result will be ‘789’.
TrimStart function #
TrimStart(<text>, <string of chars?>)
Removes all leading occurrences of a specified set of characters from the current string. If no set is specified, it defaults to removing whitespace.
For example, if you have the text “—example” and you want to remove leading hyphens, the TrimStart function would return “example”.
TrimEnd function #
TrimEnd(text, string of chars?)
Removes all trailing occurrences of a specified set of characters from the current string. If no set is specified, it defaults to removing whitespace.
For example, if you have the text "example---"
and you want to remove trailing hyphens, the TrimEnd
function would return "example"
.
StringToNumber function #
StringToNumber(<text>)
Convert a text to number.
For example, StringToNumber(“123”) will return the numeric value ‘123’. It converts a textual representation of a number into an actual numeric value.
StringToBase64 function #
StringToBase64(<text>)
Encodes a string of text into a Base64-encoded format. Base64 encoding is a method of converting binary data into a text format that can be transmitted over the internet.
For example, when you use StringToBase64(‘Hello World’), it encodes the text ‘Hello World’ and returns the encoded representation: SGVsbG8gd29ybGQ=
Base64ToString function #
Base64ToString(<text>, [<encoding>])
Takes a Base64-encoded string as input and returns the original text format. Encoding is optional.
For example, when you use Base64ToString(‘SGVsbG8gd29ybGQ=’), it decodes the Base64-encoded text ‘SGVsbG8gd29ybGQ=’ and returns the original text: ‘Hello World’.
List of encoding options:
- ASMO-708
- big5
- cp1025
- cp866
- cp875
- DOS-720
- DOS-862
- EUC-JP
- gb2312
- IBM00858
- IBM00924
- IBM01047
- IBM01140
- IBM01141
- IBM01142
- IBM01143
- IBM01144
- IBM01145
- IBM01146
- IBM01147
- IBM01148
- IBM01149
- IBM037
- IBM1026
- IBM273
- IBM277
- IBM278
- IBM280
- IBM284
- IBM285
- IBM290
- IBM297
- IBM420
- IBM423
- IBM424
- IBM437
- IBM500
- ibm737
- ibm775
- ibm850
- ibm852
- IBM855
- ibm857
- IBM860
- ibm861
- IBM863
- IBM864
- IBM865
- ibm869
- IBM870
- IBM871
- IBM880
- IBM905
- IBM-Thai
- iso-8859-1
- iso-8859-13
- iso-8859-15
- iso-8859-2
- iso-8859-3
- iso-8859-4
- iso-8859-5
- iso-8859-6
- iso-8859-7
- iso-8859-8
- iso-8859-9
- Johab
- koi8-r
- koi8-u
- ks_c_5601-1987
- macintosh
- shift_jis
- us-ascii
- utf-16
- utf-16BE
- utf-32
- utf-32BE
- utf-8
- windows-1250
- windows-1251
- windows-1252
- windows-1253
- windows-1254
- windows-1255
- windows-1256
- windows-1257
- windows-1258
- windows-874
- x-Chinese-CNS
- x-Chinese-Eten
- x-cp20001
- x-cp20003
- x-cp20004
- x-cp20005
- x-cp20261
- x-cp20269
- x-cp20936
- x-cp20949
- x-ebcdic-koreanextended
- x-Europa
- x-IA5
- x-IA5-German
- x-IA5-Norwegian
- x-IA5-Swedish
- x-mac-arabic
- x-mac-ce
- x-mac-chinesetrad
- x-mac-croatian
- x-mac-cyrillic
- x-mac-greek
- x-mac-hebrew
- x-mac-icelandic
- x-mac-japanese
- x-mac-romanian
- x-mac-thai
- x-mac-turkish
- x-mac-ukrainian
Contains function #
Contains(<text>, <searchText>)
Checks whether a given substring (searchText) is present in a larger string (text). This function returns a true\false value, indicating whether the substring is found in the larger string or not.
For example, Contains (“Engini is a non-code platform for creating applications and business processes that interface with ERP and…”,’ERP’) checks if the word ‘ERP’ present in the text, it returns ‘True’ Since in this example ‘ERP’ is indeed in the text.
ToJsonString function #
ToJsonString(<expression>)
Converts a given expression into its JSON representation and returns it.
For example, ToJsonString(“Example-Engini”) converts “Example-Engini” to a JSON representation string, and the output would be “\”Example-Engini\””.
ReverseHebrewText function #
ReverseHebrewText (<text>)
The ReverseHebrewText(<text>) function reverses the characters of a given Hebrew text.
For example, ReverseHebrewText(“שלום”) will return the reversed string “םולש”. This function is particularly useful when Hebrew text is stored in reverse order in a database and needs to be corrected before display.
Guid function #
Generates a new unique identifier (UUID/GUID).
For example, calling the Guid() function might generate a value like “123e4567-e89b-12d3-a456-426614174000”.
This can be useful in scenarios where a unique and non-repeating identifier is required, such as creating unique keys for API resources, session identifiers, or any other case where a unique ID is needed to ensure data integrity and avoid conflicts.
CreateHtmlLink function #
CreateHtmlLink(<text>,<link>)
Returns a reference tag for an HTML link.
parameters:
text – (string) the text on which you click to go to the link.
link – (string) the link to the webpage to go to.
For example,
input:
output: <a href=”https://en.wikipedia.org/”>To wikipedia</a>
stringIsNullOrEmpty function #
stringIsNullOrEmpty function (<expression>)
Checks whether a given string is empty or null. This function returns a true\false value, indicating whether the string is empty\null or not.
For example, StringIsNullOrEmpty(“ERP is defined as Enterprise Resource Planning”) checks if the string within the function is empty or null. Since in this example it contains a sentence, it’s neither null nor empty, and the function will return ‘False’.
LineFeed function #
LineFeed()
adds a control character representing the conclusion of a line (the ASCII character ‘\n’).
In the following example, the use of LineFeed() in Concat(“First,”, LineFeed(),”Second”) causes ‘Second’ to follow ‘First’ on the same line. The expected output on a Windows system would be ‘First, Second’, whereas on a Linux system, it would be:
First,
Second
GetMimeType function #
GetMimeType (<fileextension>)
MIME types serve as identifiers that specify the format of a file. This function returns the MIME type associated with a given file extension.
For example, GetMimeType(‘png’) returns the MIME type associated with the file extension ‘png’. The output is ‘image/png’.
CarriageReturn function #
CarriageReturn()
Returns new line character, is used to move the cursor or insertion point to the beginning of the line. (in ASCII, ‘\r’).
For example, the use of CarriageReturn() in Concat(“First,”, CarriageReturn(),”Second”) causes ‘Second’ to follow ‘First’ on the same line, and subsequently, the carriage moves to the beginning of the line.
The expected output is: “First, Second”
PriorityHebConvert function #
PriorityHebConvert(<String>, <columnType>)
Converts text to its corresponding form in the database. The function expects two parameters: the first is a string, and the second is the type of column in the database, which can be either CHAR or RCHAR.
You primarily use it when:
- The string is written in Hebrew, and the type of column is CHAR.
- The string is written in English, and the type of column is RCHAR.
For example, PriorityHebConvert(‘Sara’, ‘RCHAR’) reverses the order of the letter in the database. The ouput will be:’araS’.
FileLength function #
FileLength(<base64string>)
Returns the length of a file in bytes, converted from the given Base64 string.
For example, if you have a Base64 string representing a file, such as “U29tZSBleGFtcGxlIHRleHQ=”, the FileLength function will return 17.0, indicating that the original file is 17 bytes in size.
Tab function #
Tab()
Returns the tab character (\t
), which can be used to add horizontal spacing in text.
For example, if you use the Tab()
function to insert a tab space between words, such as Tab() & "example text"
, it will produce "\texample text"
, where "\t"
represents a single tab space.
Char function #
Char(<int>)
Returns the character corresponding to the given ASCII code.
For example, if you provide an ASCII code, such as 65
, the Char
function will return "A"
, which is the character represented by that ASCII code.
Ascii function #
Ascii(<character>)
Returns the ASCII code of the given character.
For example, if you provide a character, such as "A"
, the Ascii
function will return 65
, which is the ASCII code for that character.
EncryptSha1 function #
EncryptSha1(<string>)
Calculates the SHA-1 hash of a string and returns it as a 40-character hexadecimal string.
For example, if you provide a string , such “Hello” , the EncryptSha1 function will return a hashed output like: “F7FF9E8B7BB2E09B70935A5D785E0CC5D9D0ABF0“.
EncryptSha256 function #
EncryptSha256(<string>)
Calculates the SHA-256 hash of a string and returns it as a 64-character hexadecimal string.
For example, if you provide a string , such “Hello” , the EncryptSha256 function will return a hashed output like: “185F8DB32271FE25F561A6FC938B2E264306EC304EDA518007D1764826381969“.
EncryptSha512 function #
EncryptSha512(<string>)
Calculates the SHA-512 hash of a string and returns it as a 128-character hexadecimal string.
For example, if you provide a string , such “Hello” , the EncryptSha512 function will return a hashed output like: “3615F80C9D293ED7402687F94B22D58E529B8CC7916F8FAC7FDDF7FBD5AF4CF777D3D795A7A00A16BF7E7F3FB9561EE9BAAE480DA9FE7A18769E71886B03F315“.
EncryptMd5 function #
EncryptMd5(<string>)
Calculates the MD5 hash of a string and returns it as a 32-character hexadecimal string.
For example, if you provide a string , such “Hello” , the EncryptMd5 function will return a hashed output like: “8B1A9953C4611296A827ABF8C47804D7“.
RandomString function #
RandomString(<length>,<include numbers>?)
Returns a random string of the specified length using uppercase (A-Z) and lowercase (a-z) alphabetic characters. Optionally, it can include numbers (0-9) if the include numbers parameter is set to true. By default, numbers are excluded.
For example, if you provide length = 5 and keep the default include numbers = False, the RandomString function might return: “phpwC“.
Alternatively, if you set include numbers to True, the RandomString function might return: “QT24P“.
Date and Time functions #
UtcNow function #
UtcNow()
Returns the current date and time in the UTC (Coordinated Universal Time) time zone as a string. UTC is a standard time zone used across the world and is often used in programming to ensure consistency across different regions.
For example, UtcNow () will return the value ‘11/5/2023 2:01:35 PM’, which contains today’s date and the current UTC time.
FormatDateTime function #
FormatDateTime (<timestamp>, <format>)
Returns a string in a date format.
For example if the current date is April 10th, 2023, using the following function FormatDateTime(UtcNow(),”dd/MM/yyyy”) will return 10/04/2023.
LocalTimeNow function #
LocalTimeNow()
Return current timestamp according to TimeZone defined in Admin page.
For example, LocalTimeNow() will return the value ‘2023-11-30T12:55:23.2702804’, which contains today’s date and the current Jerusalem Timezone including microseconds, precisely aligned with the selected local timezone as configured within our system’s timezone settings.
ConvertToLocalTime function #
ConvertToLocalTime (<Timestamp>)
Converts given timestamp to local time according to TimeZone defined in Admin page.
For example, ConvertToLocalTime (’11/5/2023 2:01:35 PM’) is converted to the local time, resulting in the value ‘2023-11-05T16:01:35’, reflecting the current Jerusalem Timezone selection.
ConvertTimeZone function #
ConvertTimeZone (<Timestamp>,<destination timezone>,[<source timezone>])
Converts timestamp to specific TimeZone.
For example,
This variable converts the current timestamp from Jerusalem to the local time in Russia. As a result, we get ’07/24/2024 18:31:53′ in Russian time.
Notice: If no source time zone is specified, the default setting is to use the time zone configured on the Admin page.
For a list of available time zones, please refer to the TimeZones in FunctionsList guide.
AddSeconds function #
AddSeconds function (<timestamp>, <seconds>, <format>?)
Adds an integer number of seconds to a given date and time timestamp and returns a new timestamp. Format is optional.
For example, AddSeconds(10:05:01,5) will add 5 seconds to the time, so the output will be 10:05:06.
AddMinutes function #
AddMinutes function (<timestamp>, <minutes>, <format>?)
Adds an integer number of minutes to a given date and time timestamp and returns a new timestamp. Format is optional.
For example, AddMinutes(10:05:01,5) will add 5 minutes to the time, so the output will be 10:10:01.
AddHours function #
AddHours function (<timestamp>, <hours>, <format>?)
Adds an integer number of hours to a given date and time timestamp and returns a new timestamp. Format is optional.
For example, AddHours(10:05:01,5) will add 5 hours to the time, so the output will be 3:05:01.
AddDays function #
AddDays function (<timestamp>, <days>, <format>?)
Adds an integer number of days to a given date and time timestamp and returns a new timestamp. Format is optional.
For example, AddDays(10/05/2023 ,2, “MM/dd/yyyy”) will add 5 days to the date, so the output will be 10/07/2023.
AddMonths function #
AddMonths function (<timestamp>, <months>, <format>?)
Adds an integer number of months to a given date and time timestamp and returns a new timestamp. Format is optional.
For example, AddMonths(10/05/2023 ,2, “MM/dd/yyyy”) will add 2 months to the date, so the output will be 12/05/2023.
AddYears function #
AddYears function (<timestamp>, <years>, <format>?)
Adds an integer number of years to a given date and time timestamp and returns a new timestamp. Format is optional.
For example, AddYears(10/05/2023 ,2, “MM/dd/yyyy”) will add 2 years to the date, so the output will be 10/05/2025.
StringToDateTime function #
StringToDateTime (<string>, <format>)
Converts a string representation of a date and time into a timestamp. the format is necessary in order for the function to identify the string correctly.
For example, StringToDateTime(“2023-11-02 15:30:00″,”yyyy-MM-dd HH:mm:ss”) converts the string “2023-11-02 15:30:00” into a timestamp format using the specified format “yyyy-MM-dd HH:mm:ss”. The resulting timestamp will represent the date and time described in the input string. The output is 11/2/2023 3:30:00 PM.
StartOfMonth function #
StartOfMonth(<timestamp>)
Returns the date of the first day of the month corresponding to the input timestamp.
For example ,StartOfMonth(‘9/15/2023’) takes a particular date, which is September 15, 2023, as input and outputs the date and time set to the start of that same month, resulting in “2023-09-01 00:00”.
EndOfMonth function #
EndOfMonth(<timestamp>)
Returns the date of the last day of the month corresponding to the input timestamp.
For example ,EndOfMonth(‘9/15/2023’) takes a particular date, which is September 15, 2023, as input and outputs the date and time set to the last day of that same month, resulting in “2023-09-30 00:00”.
DayOfWeek fuction #
DayOfWeek(<timestamp>)
Returns the day number of the week of the timestamp. The week starts from Sunday(1).
For example, DayOf Week(‘2/3/2023’) will return the value ‘6’ because the day of this timestamp is Friday (day number 6 of the week).
DateDiff function #
DateDiff (<interval>, <date>, <date>)
Calculates the difference between two dates in various date or time units, such as years, quarters, months, weeks, days, hours, minutes, and seconds. The default interval is set to a day.
For example, DateDiff(“day”,2023/09/20,2023/09/26) computes the date difference between September 20, 2023, and September 26, 2023, and return the number 6, signifying the six-day gap between the two dates.
Date function #
Date(<year>, <month>, <day>)
Creates a timestamp from year, month and day.
For example, Date(2023,2,3) will return the value ‘2/3/2023 12:00:00 AM’, which contains the specified date in the format ‘month/day/year’, followed by the default time ’12:00:00 AM’.
DateTime function #
DateTime(<year>, <month>, <day>,<hour>,<minute>,[<seconds>])
Creates a timestamp from date and time. Seconds are optional.
For example, Date(2023,2,3,5,30) will return the value ‘2/3/2023 5:30:00 AM’, which contains the specified date and time in the format ‘month/day/year hour:minute:seconds AM/PM’. If the seconds are not provided, it defaults to ’00’ for seconds.
Day function #
Day(<timestamp>)
Returns day of timestamp.
For example ,Day(‘2/3/2023’) will return the value ‘3’, indicating the day component of the specified timestamp.
Month function #
Month(<timestamp>)
Returns month of timestamp.
For example ,Month(‘2/3/2023’) will return the value ‘2’, indicating the month component of the specified timestamp.
Year function #
Year(<timestamp>)
Returns the year of the timestamp.
For example, Year(‘2/3/2023’) will return the value ‘2023’, indicating the year component of the specified timestamp.
Hour function #
Hour(<timestamp>)
Returns the hour of the timestamp.
For example, Minutes(’11/5/2023 2:01:35 PM’) will return the value ‘2’, indicating the hour component of the specified timestamp.
Minutes fuction #
Minutes(<timestamp>)
Returns the minutes of the timestamp.
For example, Minutes(’11/5/2023 2:01:35 PM’) will return the value ‘1’, indicating the minutes component of the specified timestamp.
Seconds function #
Seconds(<timestamp>)
Returns the seconds of the timestamp.
For example, Seconds(’11/5/2023 2:01:35 PM’) will return the value ’35’, indicating the seconds component of the specified timestamp.
ConvertToUnixDatetime function #
ConvertToUnixDatetime(<timestamp>)
Converts a given datetime into a Unix timestamp, representing the number of seconds that have passed since midnight on January 1, 1970 (UTC).
For example, ConvertToUnixDatetime(<2024/12/10 15:30:00>) will return the value ‘1733844600‘, representing the number of seconds that have passed since midnight, January 1, 1970 (UTC).”
Workflow functions #
Workflow function #
Workflow()
Returns the details such as history id, display name, account name etc. of the currently running workflow instance.
For example, the name of the currently executing workflow is “Order_Update,” the Workflow () function would return that name, it’s URL, It’s historyId and its workflow Id.
Errors function #
Errors (<expression>?)
Returns all workflow errors that occurred in a workflow. You can provide a specific step number to search errors in. The output will include: title, message for each error, the number of the activity, its name, and the step where the error occurred.
For example, when using the ‘get records’ and ‘delete record’ activities, if the ‘get records’ activity and the ‘delete record’ lack a table ID or record ID, the ‘Errors()’ function will return the following array:
"Title": "Response status code does not indicate success: 404 (Not Found).",
"Message": "{\"Url\":\"Tables//Items\",\"Body\":{\"Where\":[],\"IsAnd\":true,\"Top\":0,\"OrderBy\":[]}}",
"StepNo": 7,
"Application": "Tables",
"ActivityName": "Delete Record",
"Title": "Response status code does not indicate success: 405 (Method Not Allowed).",
"Message": "{ \"url\": \"/TableItems/\", \"data\": }",
"StepNo": 7,
"Application": "Tables",
“ActivityName": "Delete Record"
LastError function #
LastError ()
Returns the last error that occurred. The output will include: title, message for each error, the number of the activity, its name, and the step where the error occurred.
For example, when using the ‘get records’ activity first and then the ‘delete record’ activity, if the ‘get records’ activity and the ‘delete record’ lack a table ID or record ID, there are two errors, but the ‘LastError()’ function will return only the last error:
"Title": "Response status code does not indicate success: 405 (Method Not Allowed).",
"Message": "{ \"url\": \"/TableItems/\", \"data\": }",
"StepNo": 7,
"Application": "Tables",
“ActivityName": "Delete Record"
LastErrorMessage function #
LastErrorMessage()
Returns the error message from the last error that occurred.
For example, when using the ‘get records’ activity first and then the ‘delete record’ activity, if the ‘get records’ activity and the ‘delete record’ lack a table ID or record ID, there are two errors, but the ‘LastErrorMessage()’ function will return only a message for the last error. The output will be:
{"url": "/TableItems/", "data": }
GetUser function #
GetUser()
Returns the current logged user details (applicable in AppMaker only).
For example, GetUser() returns FullName: Daniel Cohen, his Email: Daniel.C@gmail.com, his Phone: 0539682242, his UserId: “vdd8232e-6734-4aae-ac8e-4905545va7” and his AccountId: 1222.
ActivityStatus function #
ActivityStatus(<step number>)
Reaturns the Activity status. 0 – not ran, 1 – ran succeefully, 2 – ran with error, 3 – waiting.
For example, Activitystatus(3) will return a value of ‘1’ if activity number 3 in the workflow has run successfully.
WorkflowLastRunDate function #
WorkflowLastRunDate()
Returns the timestamp of the last run of the workflow.
GetWorkflowHistoryId function #
GetWorkflowHistoryId()
Returns the workflow history ID of the currently running workflow instance.
For example, if a workflow is currently executing and has a history ID of 12345, calling the GetWorkflowHistoryId() function would return 12345.
Collection functions #
CreateArray function #
CreateArray (<array> or <expression 1>, <expression 2>, …)
Returns an array with the provided values or expression results.
For example, CreateArray(“Friday”,”Saturday”,”Sunday”) creates an array that contains 3 days of the week:
“Friday”
“Saturday”
“Sunday”
ArrayLength function #
ArrayLength (<array>)
Returns the length (number of objects / values) in the provided array.
For example, ArrayLength([1,2,3,4]) returns the length 4.
If the array is empty, the output will be 0, because there are no objects/ values in the array.
First function #
First (<array>)
Returns the first element of an array.
For example, First ([“Friday”,”Saturday”,”Sunday”]) returns the first element in an array. In this case, it returns the first day within the array, which is “Friday”.
Last function #
Last (<array>)
Returns the last element of an array.
For example, Last ([“Friday”,”Saturday”,”Sunday”]) returns the last element in an array. In this case, it returns the last day within the array, which is “Sunday”.
Join function #
Join (<separator>, <array>)
Concatenates all the items of an array into a string, using a specified separator between each item.
For example, Join(“\”,[“Friday”, “Saturday”, “Sunday”]) combines the days into a single string using a “\” as a separator. This function will create a string that looks like this: Friday\Saturday\Sunday.
GetArrayElement function #
GetArrayElement (<array>, <expression>)
Returns value from the provided array by the provided index or expression numeric result.
Note that the index count starts at 0 (not 1).
or example, GetArrayElement([“Friday”, “Saturday”, “Sunday”] ,2) returns Sunday.
GetProperty function #
GetProperty (<object>, <expression>)
Returns value from the provided object by the provided property or expression text result.
For example, GetProperty(Person,”Name”) returns the name of the person from the object Person. In this case, it will return ‘Yuval’
Distinct function #
Distinct (<array>)
Returns an array without duplicates.
For example, Distinct([“A”, “B”, “A”]) returns [“A”, “B”].