Data types of values referenced in formulas

記事番号:040500

In Kintone, different data types are used for different fields and calculation results. The operators and functions that can be used also differ depending on the data type.
Understanding the different data types helps to correctly use fields, operators, and functions in various formulas.

Field data types

When a field is referenced in a formula, its values are treated as one of the following data types.

FieldData type
NumberNumeric type
Calculated
Date and time
Date
Time fields
Created datetime
Updated datetime
Lookup (If the lookup source is numeric type)
TextString type
Drop-down
Radio button
Lookup (If the lookup source is string type)
Created by
Updated by
Check boxString array type
Multi-choice
A string type field in a table when it is referenced by a field placed outside the table
A numeric type field in a table when it is referenced by a field placed outside the tableNumeric array type

Calculation result data types

The following table shows the data types of values returned by functions and operators in formulas.

FunctionData type
SUM

Example: SUM(1, 2, 3)
The data type of arguments is either numeric or numeric array, and the data type of the calculation result is numeric.

ROUND

Example: ROUND(A*1.1)
The data type of the argument and the calculation result is numeric.

ROUNDUP

Example: ROUNDUP(A*1.1)
The data type of the argument and the calculation result is numeric.

ROUNDDOWN

Example: ROUNDDOWN(A* 1.1)
The data type of the argument and the calculation result is numeric.

IF

Example: IF(A=100,B,C)
The first argument is boolean type. The second and third arguments are any of numeric, string, or boolean type.
The data type of the value returned from the function is the same as that of the calculation result of either the second or third argument.

AND

Example: IF(AND(A>10,B>=10),"1","0")
The data type of the arguments and the calculation result is boolean.

OR

Example: IF(OR(A>10,B>=10),"1","0")
The data type of the arguments and the calculation result is boolean.

NOT

Example: IF(NOT(A>10),"1","0")
The data type of the arguments and the calculation result is boolean.

DATE_FORMAT

Example: DATE_FORMAT(1522972800, "YYYY-M-d", "system")
The first argument is numeric type (UNIX time), the second argument is string type (display format), and the third argument is string type (timezone). The data type of the calculation result is string.

YEN

Example: YEN(1100.5, 0)
The data type of the arguments is numeric, and the data type of the calculation result is string.

CONTAINS

Example: IF(CONTAINS(Workday, "Sunday"), "Working on Sunday", "Not Working on Sunday")
The first argument is string array type, and the second argument is string type. The data type of the calculation result is boolean.

OperatorData type
+、 -、 *、 /、^The data type of arguments and the calculation result is numeric.
&The data type of arguments is any of numeric, string, or boolean. The data type of the calculation result is string.
=、 !=、 <>The data type of arguments is any of numeric, string, or boolean. The data type of the calculation result is boolean.
<、 <=、 >、 >=The data type of arguments is numeric. The data type of the calculation result is boolean.

For details on operators, functions, and their usage, refer to the following pages.