Skip to main content
All CollectionsDesigners, controls, fields and editorsExpression editor
Using yeeflow predefined functions in expression editor
Using yeeflow predefined functions in expression editor

Easily leverage Yeeflow's predefined functions in the Expression Editor. Streamline data analysis and enhance customization effortlessly.

Updated this week

Functions are are predefined formulas that can be used to perform simple or complex data calculations and logic validation etc.

Functions are predefined formulas that perform calculations by using specific values, called arguments, in a particular order, or structure. A expression support multiple predefined functions. A function support multiple functions between it, called nested functions.

  • Function Structure

    • Nested functions

  • Functions by Category

    • String functions

    • Logical functions

    • Date functions

    • Mathematical functions

    • Other (Advanced) functions


Function Structure

The structure of a function begins with the function name ①, followed by an opening parenthesis, the arguments ③ for the function separated by commas, and a closing parenthesis.

When you select any function name, you will see the instruction of how to use this function ②.

① Function Name

Yeeflow offer the available functions in listed based on your scenarios.

② Argument(s)

Arguments, or called parameters, can be numbers, strings, datetimes, logical values such as TRUE or FALSE, arrays, lookup references, or any applicable expressions. The argument you designate must produce a valid value for that argument. Arguments can also be constants, formulas, or other functions.

③ Formula Tooltip

A tooltip will appears as you select this function.

Nested Functions

In certain cases, you may need to use a function as one of the arguments of another function. For example, the following formula uses a nested isNullOrEmpty function as an argument to return the value. The isNullOrEmpty is nested within the iif

function.

Please Note: When a nested function is used as an argument, the nested function must return the same type of value that the argument uses. For example, if the argument returns a TRUE or FALSE value, the nested function must return a TRUE or FALSE value. If the function doesn't, it displays an error value.

<Return to Top>


Functions by Category

Functions are categorized by their functionality. Click a category header to quick browse its functions.

Based on scenarios, Yeeflow offers different functions under categories.

  • String Functions

String functions perform various character manipulations. They operate on character strings. A string expression evaluates to a sequence of characters or text.

Function

Description

Example

concat

Concatenates multiple text values into a single string.
Syntax: concat(<s1>, [<s2>], [<s3>], [<s4>])
Applied: All

- example formula: concat("Hello", " ", "World")
- example: concat("Hello", " ", "World")
- example output: "Hello World"

formatNumber

Formats a number to a specified number of decimal places.
Syntax: formatNumber(<expression>, <digit>, <Thousandths>)
Applied: All

- example formula: formatNumber(1234.567, 2)
- example: formatNumber(1234.567, 2)
- example output: 1234.57

JSONParse

Parses a JSON string into an object.
Syntax: JSONParse (<string>)
Applied: Form variables & rules & conditions

- example formula: JSONParse("{\"name\":\"John\"}")
- example: JSONParse("{\"name\":\"John\"}")
- example output: { "name": "John" }

JSONStringify

Converts an object to a JSON string.
Syntax: JSONStringfy (<object>)
Applied: Form variables & rules & conditions

- example formula: JSONStringify({"name": "John"})
- example: JSONStringify({"name": "John"})
- example output: "{"name":"John"}"

left

Returns the specified number of characters from the start of a string.
Syntax: left(<str>, <len>)
Applied: All

- example formula: left("Hello", 2)
- example: left("Hello", 2)
- example output: "He"

len

Returns the number of characters in a string.
Syntax: len(<check_expression>)
Applied: All

- example formula: len("Hello")
- example: len("Hello")
- example output: 5

lower

Converts text to lowercase.
Syntax: lower(<expression>)
Applied: All

- example formula: lower("HELLO")
- example: lower("HELLO")
- example output: "hello"

regExpTest

Tests a regular expression match against a specified string, returning true or false.
Syntax: regExpTest(<regular expression>, <target>)
Applied: All

- example formula: regExpTest("^[A-Z]+$", "HELLO")
- example: regExpTest("^[A-Z]+$", "HELLO")
- example output: true

repeat

Repeats a string a specified number of times.
Syntax: repeat(<str>, <count>)
Applied: All

- example formula: repeat("Hello", 3)
- example: repeat("Hello", 3)
- example output: "HelloHelloHello"

replace

Replaces the first occurrence of a specified substring with another string.
Syntax: replace(<expression>,<pattern>,<replacement>,<type>)
Applied: All

- example formula: replace("Hello World", "World", "Yeeflow")
- example: replace("Hello World", "World", "Yeeflow")
- example output: "Hello Yeeflow"

replaceAll

Replaces all occurrences of a specified substring with another string.
Syntax: replaceAll(<str>, <from>, <to>)
Applied: All

- example formula: replaceAll("Hello World World", "World", "Yeeflow")
- example: replaceAll("Hello World World", "World", "Yeeflow")
- example output: "Hello Yeeflow Yeeflow"

right

Returns the specified number of characters from the end of a string.
Syntax: right(<str>, <len>)
Applied: All

- example formula: right("Hello", 2)
- example: right("Hello", 2)
- example output: "lo"

strIndex

Searches for a substring within a string and returns the starting position if found.
Syntax: strIndex(<expressionToFind>, <expressionToSearch>[, <start_location>])
Applied: All

- example formula: strIndex("Hello", "e")
- example: strIndex("Hello", "e")
- example output: 1

subString

Extracts a substring from a specified position in a string for a given length.
Syntax: subString(<expression>,<start>,<length>)
Applied: All

- example formula: subString("Hello", 1, 3)
- example: subString("Hello", 1, 3)
- example output: "ell"

text

Converts various data types to text format.
Syntax: text(<X>)
Applied: All

- example formula: text(123)
- example: text(123)
- example output: "123"

trim

Removes whitespace from both ends of a string.
Syntax: trim(<expression>)
Applied: All

- example formula: trim(" Hello ")
- example: trim(" Hello ")
- example output: "Hello"

UniqueID

Generates a unique identifier.
Syntax: UniqueID()
Applied: Form variables & rules & conditions

- example formula: UniqueID()
- example: UniqueID()
- example output: "a1b2c3d4"

upper

Converts text to uppercase.
Syntax: upper(<expression>)
Applied: All

- example formula: upper("hello")
- example: upper("hello")
- example output: "HELLO"

  • Logical Functions

Logical functions can create expressions that convert values from one to another.

Function

Description

Example

iif

Evaluates each WHEN condition. If it is met, executes the corresponding THEN expression. If none of the WHEN conditions are met, the ELSE expression or specified alternative value is executed. If no ELSE expression is provided, the system automatically adds ELSE NULL.
Syntax: iif(<condition>, <then>, <else>)
Applied: All

- example formula: iif(<condition>, <then>, <else>)
- example: iif(<Status> = <Approved>, <Yes>, <No>)
- example output: Yes

isFalse

Determines if an expression is false.
Syntax: isFalse(<parameter>)
Applied: Form variables & rules & conditions

- example formula: isFalse(<parameter>)
- example: isFalse(<isActive>)
- example output: true

isNullOrEmpty

Returns True if the specified string or object is NULL or an empty string; otherwise, returns False.
Syntax: isNullOrEmpty(<check_expression>)
Applied: All

- example formula: isNullOrEmpty(<check_expression>)
- example: isNullOrEmpty(<Description>)
- example output: true

isTrue

Determines if an expression is true. The expression is considered “true” in the following cases: boolean type is “true”; string “True”; non-zero number, all considered true.
Syntax: isTrue(<parameter>)
Applied: Form variables & rules & conditions

- example formula: isTrue(<parameter>)
- example: isTrue(<isActive>)
- example output: true

not

Inverts the expression to true or false.
Syntax: not(<parameter>)
Applied: Form variables & rules & conditions

- example formula: not(<parameter>)
- example: not(<isActive>)
- example output: false

  • Date Functions

Date functions conduct the data of DATE and DATETIME based on a calendar year.

Function

Description

Example

addWorkDays

Adds or subtracts a specified number of workdays to a date.
Syntax: addWorkDays (<start>, <days>)
Applied: All

- example formula: addWorkDays("2024-01-01", 5)
- example: addWorkDays("2024-01-01", 5)
- example output: 2024-01-08

addWorkHours

Adds or subtracts a specified number of work hours to a date.
Syntax: addWorkHours (<start>, <hours>)
Applied: All

- example formula: addWorkHours("2024-01-01 09:00", 8)
- example: addWorkHours("2024-01-01 09:00", 8)
- example output: 2024-01-01 17:00

dateAdd

Adds or subtracts a specified interval from a date.
Syntax: dateAdd (<date>, <type>, <added value>)
Applied: All

- example formula: dateAdd("2024-01-01", "day", 10)
- example: dateAdd("2024-01-01", "day", 10)
- example output: 2024-01-11

dateDiff

Calculates the interval between two dates. Returns a negative value if the first date is later than the second.
Syntax: dateDiff (<date 1>, <date 2>, <type>, <precise>)
Applied: All

- example formula: dateDiff("2024-01-01", "2024-01-10", "day")
- example: dateDiff("2024-01-01", "2024-01-10", "day")
- example output: 9

dateFormat

Formats a date and time according to specified patterns.
Supported patterns:
Year: YYYY
Month: MM
Day: DD
Hour: HH
Minute: mm
Second: ss
Syntax: dateFormat (<date>, <format>)
Applied: All

- example formula: dateFormat("2024-01-01 10:30:00", "YYYY-MM-DD HH:mm")
- example: dateFormat("2024-01-01 10:30:00", "YYYY-MM-DD HH:mm")
- example output: 2024-01-01 10:30

datePart

Extracts a specific part of a date.
Syntax: datePart (<original date>, <type>)
Applied: All

- example formula: datePart("2024-01-01", "month")
- example: datePart("2024-01-01", "month")
- example output: 1

datePicker

Selects a date and time.
Syntax: datePicker (<selected date>)
Applied: All

- example formula: datePicker("2024-01-01")
- example: datePicker("2024-01-01")
- example output: 2024-01-01

day

Extracts the day from a date.
Syntax: day (<date>)
Applied: All

- example formula: day("2024-01-15")
- example: day("2024-01-15")
- example output: 15

getWorkHours

Calculates the number of work hours between two dates.
Syntax: getWorkHours (<start>, <end>)
Applied: All

- example formula: getWorkHours("2024-01-01 09:00", "2024-01-01 17:00")
- example: getWorkHours("2024-01-01 09:00", "2024-01-01 17:00")
- example output: 8

hour

Extracts the hour from a date.
Syntax: hour(<time>)
Applied: All

- example formula: hour("2024-01-01 15:30")
- example: hour("2024-01-01 15:30")
- example output: 15

minute

Extracts the minute from a date.
Syntax: minute(<time>)
Applied: All

- example formula: minute("2024-01-01 15:30")
- example: minute("2024-01-01 15:30")
- example output: 30

month

Extracts the month from a date.
Syntax: month (<date>)
Applied: All

- example formula: month("2024-01-01")
- example: month("2024-01-01")
- example output: 1

now

Returns the current date and time.
Syntax: now ()
Applied: All

- example formula: now()
- example: now()
- example output: 2024-10-30 14:35:00

second

Extracts the seconds from a date.
Syntax: second(<time>)
Applied: All

- example formula: second("2024-01-01 15:30:45")
- example: second("2024-01-01 15:30:45")
- example output: 45

toServerTime

Converts a date to server time.
Syntax: toServerTime (<date>)
Applied: All

- example formula: toServerTime("2024-01-01 15:30")
- example: toServerTime("2024-01-01 15:30")
- example output: Server Time

toUserTime

Converts a date to user local time.
Syntax: toUserTime (<date>)
Applied: All

- example formula: toUserTime("2024-01-01 15:30")
- example: toUserTime("2024-01-01 15:30")
- example output: Local Time

weekNum

Retrieves the week number from a date.
Syntax: weekNum(<date>, [<useISO>])
Applied: All

- example formula: weekNum("2024-01-01")
- example: weekNum("2024-01-01")
- example output: 1

year

Extracts the year from a date.
Syntax: year (<date>)
Applied: All

- example formula: year("2024-01-01")
- example: year("2024-01-01")
- example output: 2024

  • Mathematical Functions

Mathematical functions perform mathematical operations on the data of NUMBER.

Function

Description

Example

abs

Retrieve the absolute value of a number. You can use this function to make sure that a number is positive.
Syntax: abs(<number or number property>)
Applied: All

- example formula: abs(<number or number property>)
- example: abs(-10)
- example output: 10

ceil

Returns the smallest integer value not less than the parameter.
Syntax: ceil(<number or number property>)
Applied: All

- example formula: ceil(<number or number property>)
- example: ceil(4.2)
- example output: 5

fixed

Formats a number with a fixed number of decimal places.
Syntax: fixed(<number>, <digit>)
Applied: All

- example formula: fixed(<number>, 2)
- example: fixed(4.567, 2)
- example output: 4.57

floor

Returns the largest integer value not greater than the parameter.
Syntax: floor(<number or number property>)
Applied: All

- example formula: floor(<number or number property>)
- example: floor(4.8)
- example output: 4

log

Returns the natural logarithm (base e) of a number.
Syntax: log(<n1>, [<n2>])
Applied: All

- example formula: log(<number or number property>)
- example: log(10)
- example output: 2.3026

max

Returns the maximum value among the provided values.
Syntax: max(n1, <n2>, <n3>, <n4>)
Applied: All

- example formula: max(<number1>, <number2>)
- example: max(5, 10)
- example output: 10

min

Returns the minimum value among the provided values.
Syntax: min(n1, <n2>, <n3>, <n4>)
Applied: All

- example formula: min(<number1>, <number2>)
- example: min(5, 10)
- example output: 5

number

Converts a value to a number.
Syntax: number(<X>)
Applied: All

- example formula: number(<X>)
- example: number("123")
- example output: 123

pow

Raises a number to the power of another number.
Syntax: pow(<X>, <Y>)
Applied: All

- example formula: pow(<X>, <Y>)
- example: pow(2, 3)
- example output: 8

rand

Returns a random number between 0 (inclusive) and 1 (exclusive).
Syntax: rand()
Applied: All

- example formula: rand()
- example output: 0.5674

round

Rounds a value to the nearest integer or to the specified number of fractional digits.
Syntax: round(<number expression>, [<digits>])
Applied: All

- example formula: round(<number expression>, [<digits>])
- example: round(3.456, 2)
- example output: 3.46

sqrt

Returns the square root of a number.
Syntax: sqrt(<X>)
Applied: All

- example formula: sqrt(<X>)
- example: sqrt(16)
- example output: 4


This format follows your requested style for the examples and outputs. Let me know if any other changes are needed!

  • Other Functions - Advanced functions

The other functions contain some advanced functions as:

  • Lookup functions, such as "listLookup"

  • System reference functions, such as "getUserAttr"

  • Statistical functions, such as "arrayConcat”

  • Engineer Functions. such as "getAttr"

It returns the values from your lookup source, system data, or some complex variables.

Function

Description

Example

arrayConcat

Returns a new array that contains the elements of each of the given sequence of two arrays.
Syntax: arrayConcat (<arr1>, <arr2>)
Applied: All

- example formula: arrayConcat (<arr1>, <arr2>)
- example: arrayConcat(<1, 2>, <3, 4>)
- example output: [1, 2, 3, 4]

arrIndex

Locates the position of a value in an array; returns -1 if not found.
Syntax: arrIndex(<array expression>, <value expression>)
Applied: All

- example formula: arrIndex(<array expression>, <value expression>)
- example: arrIndex(["a", "b", "c"], "b")
- example output: 1

clientType

Retrieves the client type information, such as "web" or "mobile".
Syntax: clientType()
Applied: All

- example formula: clientType()
- example: clientType()
- example output: "web"

currentUser

Returns information about the current user.
Syntax: currentUser()
Applied: All

- example formula: currentUser()
- example: currentUser()
- example output: { "id": "123", "name": "John Doe" }

getAttr

Returns the attribute value from an object by the given attribute.
Syntax: getAttr(<object>, <path>, [defaultValue])
Applied: Forms Variables & Rules & Conditions

- example formula: getAttr(<object>, <path>, [defaultValue])
- example: getAttr({"email": "[email protected]"}, "email")
- example output: "[email protected]"

getCostCenterAttr

Retrieves Cost Center attribute. Attributes will be separated by commas if expression is an array.
Syntax: getCostCenterAttr(<expression>, <attribute>, [<default value>])
Applied: All

- example formula: getCostCenterAttr(<expression>, <attribute>, [<default value>])
- example: getCostCenterAttr({"code": "CC001"}, "code")
- example output: "CC001"

getDirectReports

Pass in the user ID, returning an array of its immediate subordinate user IDs.
Syntax: getDirectReports(<expression>, [<default value>])
Applied: All

- example formula: getDirectReports(<expression>, [<default value>])
- example: getDirectReports("12345")
- example output: ["54321", "67890"]

getLocAttr

Retrieves location attribute. Attributes will be separated by commas if location expression is an array.
Syntax: getLocAttr(<location expression>, <attribute>, [<default value>])
Applied: All

- example formula: getLocAttr(<location expression>, <attribute>, [<default value>])
- example: getLocAttr({"city": "New York"}, "city")
- example output: "New York"

getMetadataAttr

Retrieves metadata attribute, separated by commas if the expression is more than one ID.
Syntax: getMetadataAttr(<expression>, <attribute>, [<default>])
Applied: All

- example formula: getMetadataAttr(<expression>, <attribute>, [<default>])
- example: getMetadataAttr({"type": "document"}, "type")
- example output: "document"

getDeptAttr

Retrieves department attribute. Attributes will be separated by commas if department expression is an array.
Syntax: getDeptAttr(<department expression>, <attribute>, [<default value>])
Applied: All

- example formula: getDeptAttr(<department expression>, <attribute>, [<default value>])
- example: getDeptAttr({"name": "IT"}, "name")
- example output: "IT"

getDeptByParent

Gets ID array of departments by parent department.
Syntax: getDeptByParent(<department expression>, <type>])
Applied: All

- example formula: getDeptByParent(<department expression>, <type>])
- example: getDeptByParent({"id": "001"}, "subDepartments")
- example output: ["002", "003"]

getQueryString

Retrieves the value of the specified query parameter from the URL.
Syntax: getQueryString(<key>, [<default>])
Applied: All

- example formula: getQueryString(<key>, [<default>])
- example: getQueryString("user_id", "default")
- example output: "12345"

getUserAttr

Retrieves user attribute. Attributes will be separated by commas if the user expression is an array.
Syntax: getUserAttr(<user expression>, <attribute>, [<default value>])
Applied: All

- example formula: getUserAttr(<user expression>, <attribute>, [<default value>])
- example: getUserAttr({"name": "Alice"}, "name")
- example output: "Alice"

getWindowMode

Retrieves the mode information of the current window and returns the corresponding numeric identifier. If no mode is set, it returns a default value.

Syntax: getWindowMode(<mode>, <default value>)

Applied: All

- example formula: getWindowMode("fullscreen", "1")

- example output: "1"

isInGroup

Determines if a user is in the specified group.
Syntax: isInGroup (<user>, <group>)
Applied: All

- example formula: isInGroup (<user>, <group>)
- example: isInGroup("12345", "AdminGroup")
- example output: true

len

Returns the length of a string or array.
Syntax: len(<check_expression>)
Applied: All

- example formula: len(<Array>)
- example: len([1, 2, 3])
- example output: 3

listLookup

Retrieves field value from a data list.
Syntax: listLookup(<contentList>, <filter>, <field>, <defaultValue>)
Applied: Forms Variables & Rules & Conditions

- example formula: listLookup(<contentList>, <filter>, <field>, <defaultValue>)
- example: listLookup(<Employees>, <id = 123>, <name>, <Unknown>)
- example output: "John Doe"

positionLookup

Finds user(s) by position.
Syntax: positionLookup (<position>, <type>, <result>, [<expr>])
Applied: Forms Variables & Rules & Conditions

- example formula: positionLookup (<position>, <type>, <result>, [<expr>])
- example: positionLookup(<Manager>, <Department>, <name>, <Unknown>a0)
- example output: ["Alice", "Bob"]

vLookup

Searches for rows that contain a specific value in a column or in an array, and returns either the entire row object or data from a specified column within the row. The result can be a single record or an array of all matching objects.
Syntax: vLookup(<lookupValue>, <list>, <lookupColumn>, <matchRange>, [<returnColumn>])
Applied: All

- example formula: vLookup(<lookupValue>, <list>, <lookupColumn>, <matchRange>, [<returnColumn>])
- example: vLookup("123", "Employees", "id", "=", "name")
- example output: "John Doe"

Did this answer your question?