Set Field Type

Set Field Type command changes the field type of selected field.

  • In cases such as converting a field containing string to a number field etc. when data cannot be saved in the converted field, the original data is discarded and field is generated as a blank field.
  • When changing to a radio button field, if output app field does not have the same selection as value before the change, the original data is discarded and the first selection item is selected.
  • When changing to either of checkbox, multi-choice, or drop-down fields, if field of the output application does not have the same selection item as value before change, the original data is discarded and the item is output without any item in selected state.
Settings
Setting Description
1. Select a field to set its data type Select the field whose field type is to be changed.
2. Enter the name of the new field Enter a new field name to change the field name after changing the field type.
3. Select the new data type for the field Select the new field type. New field types that can be selected depends on the original field type.
Separator:
When checkbox or multi-choice field is selected in the new field type, you need to use a separator character to split the string before change into items of checkbox or multi-choice field.
This setting is not required if new field type is set to any field type other than checkbox and multi-choice.
Example 1

This example demonstrates how to change a calculated field that subtotals Unit price and Quantity fields into a number field and to change the record creation date to a date field named Registration date.

Input Data

Command Settings

1. Select a field to set its data type 2. Enter the name of the new field 3. Select the new data type for the field
Subtotal Subtotal Number
Created datetime Registration date Date

Settings Page

Execution Result

While changing the Created datetime field to a Date field, value of the time portion is truncated.

Example 2

This example demonstrates how to convert a text field into a radio button or a checkbox.

When a text field is changed to a radio button field, the changed radio button selects the item that matches the value of the original text. When a text field is changed to a checkbox field, the changed checkbox splits the original text using a separator and selects multiple items that match the value of the separated text.

Input Data

Command Settings

1. Select a field to set its data type 2. Enter the name of the new field 3. Select the new data type for the field
Text1 Radio button Radio button
Text2 Checkbox Checkbox
Separator: Comma

Settings Page

Execution Result

Field Types That can be Changed

Below table indicates the field types that can be changed using Set Field Type command.

kintone field types

Field type before change Field type after change Remarks
Text Rich text Text area Number Radio button Checkbox Multi-choice Drop-down Date Time Date and time Link User selection Department selection Group selection
Text
(*1)

(*2)

(*3)

(*3)

(*3)

(*1)

(*1)

(*1)

(*1)

(*7)
(*8)

(*7)
(*8)

(*7)
Rich Text
Text area
Number
Calculated
Radio button
Check box
Multi-choice
Drop-down
Date
(*4)
Time
Date and time
(*5)

(*6)
Attachment Only file name of attachment is saved in the changed field and the file itself is discarded.
Link
User selection
Department selection
Group selection
Lookup
(*1)

(*1)

(*1)

(*1)

(*1)
Record number
Created by
Created datetime
(*5)

(*6)
Updated by
Updated datetime
(*5)

(*6)

(*1) When changing to the Number, Date, Time, Date and time, and Link fields, if a value that cannot be saved in the changed field type is detected, the original data is discarded and blank is set.

(*2) When changing to a radio button field, if output app field does not have the same selection as value before the change, the original data is discarded and the first selection item is selected.

(*3) When changing to either of checkbox, multi-choice, or drop-down fields, if field of the output application does not have the same selection item as value before change, the original data is discarded and the item is output without any item in selected state.

(*4) When changing to the Date and time field, "00:00" is set for the time part.

(*5) When changing to a Date field, value of the time part is truncated.

(*6) When changing to a Time field, value of the date part is truncated.

(*7) When changing the User selection, Department selection, and Group selection fields, if a user, department, or group that does not exist in the domain is detected, the original data is discarded and blank is set. The existence of the value before it is converted within the domain can be verified using the Data Check command's existence user check.

(*8) When changing the User selection and Department selection, if multiple user names or department names existing in the domain are detected, the original data is discarded and blank is set.

App data other than kintone field types

Field type before change Field type after change Remarks
Text Rich text Text area Number Radio button Checkbox Multi-choice Drop-down Date Time Date and time Link User selection Department selection Group selection
Status
(*9)

(*10)
Worker
Category

(*9) When changing to a radio button field, if output app field does not have the corresponding selection item, the original data is discarded and the first selection item is selected.

(*10) When changing to a drop-down button field, if output app field does not have the corresponding selection item, the original data is discarded and blank is set.

See Also