Skip to main content

Model Overview

  • Standard User model object
  • Standard Department model object

UserBuilder

Expression

Formula description: User builder function. Generates the User model collection that corresponds to a given userid list or member component.

Input Parameters

Return Value

Example

DirectorBuilder

Expression

Formula description: Manager builder function. Returns the level-th manager of the current signed-in user or of a specified user. The level parameter must be >= 1. Returns the User model collection of the matching manager(s); multiple managers are returned when the user belongs to multiple departments.

Input Parameters

  • Parameter 1: The userid that identifies the target user. Pass "" to use the current signed-in user.
  • Parameter 2: level. Returns the level-th manager. Only valid when level >= 1.

Return Value

  • Standard User model object of the manager: [{User object},{User object}]

Example

DeptBuilder

Expression

Formula description: Department builder function. Retrieves the specified Department object model based on the input conditions. This formula does not support subforms.

Input Parameters

Parameter 1 (three modes):
  • No parameter: the direct department of the current signed-in user.
  • userid: the direct department of the specified user ID.
  • Single-select member component: the direct department of the user referenced by that member component.

Return Value

  • Standard Department model object: [Department object, Department object]. A user can belong to multiple departments at the same time.

Example

GetObjectField

Expression

Formula description: GetObjectField is a utility function. JsonObject is a general-purpose standard object storage format that organizes data internally using a key:value structure. GetObjectField returns the value of the specified key from a given standard JSON object.Note: Not supported inside subforms.

Input Parameters

  • Parameter 1: The standard JsonObject to read from.
  • Parameter 2: fieldKey. The first-level attribute key of the object in parameter 1.

Return Value

  • The value that corresponds to the object’s attribute key. Defaults to Text type.

Example

GetArrayItem

Expression

Formula description: GetArrayItem is a utility function. JsonArray is a general-purpose standard array collection storage format in which each unit is a standard JsonObject or JsonArray. GetArrayItem returns the n-th data unit (either a JsonObject or JsonArray) from a given standard JsonArray. n >= 1, where n = 1 refers to the first data unit.

Input Parameters

  • Parameter 1: Standard JsonArray type.
  • Parameter 2: n. Returns the n-th data unit object in the array.

Return Value

  • The n-th data unit in parameter 1. The type may be JsonObject or JsonArray.

Example

Example member component data:[{“label”:“John (Employee ID 11)”,“key”:“userid123”},{“label”:“Mary (Employee ID 22)”,“key”:“userid124”}]

Returns

Example: