Skip to main content

Function Calculation


Like the functions in Excel, Mingdao provides a variety of functions for processing data. After setting a formula for a field in a worksheet, the value of the field can be obtained automatically when creating or modifying a record. There is no need to fill in the field manually, improving efficiency.

In the following two scenarios, you can rely on functions to process the data.

  • Set the default value for the field
  • Calculating nodes in a workflow There are five types of functions, which are math function, date function, text function, logical function and advanced function.

Example

  1. Use the date function to change the display format of the date

  2. Use the logical function to derive the corresponding results

    If the value of a field follows the change of other fields, the logical function can be selected.

  3. Use the text function to identify the birth date in the ID number

Configuration

Default values of the following fields can be set by the function: text, numeric, amount, date, email, telephone

Fields that can be used as parameters of the function: text, numeric, amount, email, telephone, date, choice, choices, members, department, check items, region/city, ID Number, sub-form

  • Fields that cannot be used as parameters: level, concat, foreign, formula, rollup, auto-number, rich text, cascading, file, uppercase, signature

Entrance: On the form editing page, select the target field, go to [Default value] > [Use dynamic value] > [Function calculation].

Select the target function and field from the left, or edit the function and static parameters manually.

Composition of a Function

A function formula generally consists of a function name, parameters, operation symbols, and parameter separators.

As shown in the function below, the parameters can be either fields or static values.

In practice, a function may not involve all of the above elements, or you can nest multiple functions.

Rules for Writing Functions

1. No equal sign [=] at the beginning of the function

2. Select the function and field parameter

  • You can choose the desired function from the left, or you can enter it manually, all in uppercase.
  • Fields must be selected from the left.

3. Select the appropriate function type

The result returned by each function belongs to some fixed type. Therefore, when setting a default value for a field, you must select a function that is consistent with the field type.

For example, when you want to set a default value for a numeric field, if you select [DATENOW()], which returns the time, there will be no content.

4. Write operational symbols correctly

Add+
Subtract-
Multiply*
Divide/
Greater than
Equal to==
Less than
Greater than or equal to>=
Less than or equal to<=
Not equal to!=

5. Write parameters correctly

For example, for the SUM function, the parameter must be a numeric field, if you select a date field, the result cannot be returned.

Most functions require parameters. Parameters can be static values, dynamic values, or a combination of the two. You must ensure the correct writing of parameters.

1). Static parameters

A static parameter refers to the parameter that is written as a fixed value, using the same value for each calculation.

  • Static parameters of text, time and choice fields must be enclosed in single quotes at the beginning and end.

    Example 1: What day is October 11th, 2021?

    Example 2: Replace the 4-7 digits in the phone number with *. It is a fixed parameter with single quotation marks at the beginning and end.

  • For static parameters of numeric field, write numbers directly

    Example 3: When getting the mobile phone number, you need to specify which digit to start with, and you can write 4 directly without quotation marks.

2). Dynamic parameters

  • If the parameter is the value of the field, you can select it directly without quotation marks.

    Example 1: If you want an approximate value of a decimal, select the field directly.

    Example 2: If you want the sum of the values of multiple fields, select the corresponding fields and add a separator (English comma) between the parameters.

  • If the parameter is the result returned by another function, there are no quotation marks at the beginning and end.

    Example 3: Get the day of the current date.

3). Combination of static parameters and dynamic parameters

If the parameter is a combination of dynamic and static parameters, no quotation marks are required.


Have questions about this article? Send us feedback