Importing Record Data from a File into an App
You can add new records or update existing records in an existing app by importing file data into the app.
You can also add new rows or update existing rows for tables in records.
This article provides instructions on how to import file data into an existing app and points to note when carrying out the operation to import file data.
Points to note before importing a file
- Depending on field types and how field settings are configured, there may be cases where a field does not accept data registration/update via file import.
Check for fields that do not accept data registration/update and data that cannot be registered/updated
Check for records and fields you cannot view or edit - To import data from a file, you need to be granted the "Import from file" permission in the Permissions for App settings.
Additionally, to import data into "Created by," "Created datetime," "Updated by," and/or "Updated datetime" fields when creating new records via file import, you also need to be granted the "Manage app" permission.
Configuring Permissions for Apps - It is recommended that you create a backup of existing records by exporting them to a file before importing data via file import. For details on how to export them to a file, refer to Exporting Data to a File.
- While data is being imported from a file, you may not be able to add or update records from the Kintone screen or via APIs.
Key points of the Import from File operation
When importing data from a file, you need to specify which field to import data into by mapping the correspondence between columns in the file and fields in the app.
If you want to update existing records, you also need to specify which field will be used as the "key to bulk update."
This section explains key points of these two settings.
(a) Key points for specifying "Column in File"
In the Column in File section on the "Import from File" screen, specify which field to import data into by mapping the correspondence between fields in the app and columns in the file.
-
If the field into which you want to import file data is not displayed under Field in App, it is a field that does not accept data registration/update via file import or a field for which you do not have view or edit permission.
For example, fields whose values are calculated or retrieved based on the values of other fields (e.g., fields that have formulas set) do not appear under Field in App. The values of these fields will be re-calculated or retrieved again when file data is imported.
For more information, refer to Checking the Destination App for File Import. -
When creating new records via file import, you need to specify the corresponding file columns for the app's required fields (fields marked with "*").
Also, when the exiting records you are going to update include those that do not have the app's required fields populated, you need to specify the corresponding file columns for these fields. -
If you do not want to register or update values for some fields, select (None) for these fields.
- In records that are newly added via file import, the field for which (None) is selected are left empty or the default value is input (if a default value is set for the field).
- In existing records whose values are updated via file import, the value for the field for which (None) is selected is not changed from the value before the file import.
To prevent yourself from accidentally overwriting existing record data with old data especially when you update existing records, make sure to select (None) for fields whose values you do not want to update.
-
If you want to update table data in existing records via file import, specify the corresponding file columns for all the fields in the table which are displayed under Field in App. You must also specify the corresponding file columns for fields whose data has not been modified in the file so that these fields are also included in the scope of file import.
(b) Key points for specifying "Key to Bulk Update"
When updating existing records, specify which field will be used as Key to Bulk Update.
The field set as Key to Bulk Update will be used for determining which record data will be replaced with which row data in the file. The field set as Key to Bulk Update has to be one that does not accept duplicate values across multiple records. Record numbers and order numbers are the examples of the fields that are suitable for Key to Bulk Update.
When you set a field as Key for Bulk Update and carry out the Import from File operation, values of the field set as Key to Bulk Update are compared with the values in the corresponding file column.
- When a value in the file column matches a value of the field set as "Key to Bulk Update"
The data of the record with the matching value is replaced with the data of the file's row that contains the value. - When a value in the file column does not match any values of the field set as "Key to Bulk Update"
The data of the file's row that contains the value is added as a new record.
The following are the fields that can be set as Key to Bulk Update:
- Record number
- Text
- Number
- Date
- Date and time
- Link
Steps to import a file
-
Click the Options icon at the upper right of the "View" screen, then click Import from File.
If Import from File is not displayed, you need to be granted the "Import from file" permission in the Permissions for App settings.
Configuring Permissions for Apps -
Click Browse and select a file to import.
-
Select one of the radio buttons under Select Data Scope.
If your file has column names in the first row, select First row is header. Depending on the content of your file, First row is header may be automatically selected. -
Select one of the radio buttons under Configure the Import Settings Below. Select the optional checkbox if necessary.
For details on configuring these import settings, refer to the following page.
About the New and Classic File Import Methods -
Check that the content of your file is correctly displayed in the Preview section.
The Character Encoding and Delimiter drop-down lists are displayed only when you are importing a CSV file.- If characters in the file are garbled, select a different option from the Character Encoding drop-down list.
- If the file data is not separated into columns correctly, select a different option from the Delimiter drop-down list.
-
Set the corresponding file columns for the app's fields to specify which field to import the column data into.
Reference: (a) Key points for specifying "Column in File"
If the file has column names in the first row, Kintone automatically looks for matches between the column names and the app's field names and sets columns in the Column in File section accordingly.- If the field into which you want to import file data is not displayed, it is a field that does not accept data registration/update via file import or a field for which you do not have view or edit permission.
For information on such fields, refer to the following page.
Checking the Destination App for File Import - When creating new records via file import, you need to specify the corresponding file columns for the app's required fields (fields marked with "*").
- If you do not want to register or update values for some fields, select (None) for these fields.
- In records that are newly added via file import, the field for which (None) is selected are left empty or the default value is input (if a default value is set for the field).
- In existing records whose values are updated via file import, the value for the field for which (None) is selected is not changed from the value before the file import.
When importing data into a table
Fields in a table are displayed in the following format: "Table name > Field name"
When updating exiting records, specify the corresponding file columns for all the fields in the table.
- If the field into which you want to import file data is not displayed, it is a field that does not accept data registration/update via file import or a field for which you do not have view or edit permission.
-
When updating existing records, select the Key to Bulk Update check box.
Reference: (b) Key points for specifying "Key to Bulk Update"
The following are the fields that can be set as Key to Bulk Update:- Record number
- Text
- Number
- Date
- Date and time
- Link
-
If you want to import file data into the "Created by," "Created datetime," "Updated by," and "Updated datetime" fields of the records to be newly added, specify the corresponding file columns for the fields displayed in the Record Creation/Update Information section.
- If the fields are not displayed in the Record Creation/Update Information section, you need to be granted the "Manage app" permission in the Permissions for App settings.
Configuring Permissions for Apps - If you select (None) for these fields, the user who carries out the Import from File operation is registered in the "Created by" and "Updated by" fields of newly added records, and the date and time of the operation is registered in the "Created datetime" and "Updated datetime" fields of the records.
- If the fields are not displayed in the Record Creation/Update Information section, you need to be granted the "Manage app" permission in the Permissions for App settings.
-
Click Import on the upper left side of the screen.
When the file import starts, you are automatically navigated to the app's "View" screen.
A message is displayed at the top of the "View" screen, showing you the progress and result of the file import.
Clicking the link in the message navigates you to the "Imported Files" screen. On the "Imported Files" screen, you can check the progress of the Import from File operation you have performed and details of any errors that occur.
Checking the Status of File Import
If your Import from File operation failed, refer to What to Do If Bulk Adding/Updating of Records Fails for the solutions.