Importing Record Data from a File into an App

Article Number:040724

You can create new records or update existing records in an existing app by importing file data into the app.
You can also to add new table rows or update existing table rows in records by importing file data.

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

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. Screenshot: Mapping the correspondence between file columns and app fields

(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.
Figure: Mapping the correspondence between app fields and file columns

  • 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.

  • 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 created 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.

Figure: Example of how records are added or updated based on the values of the field set as "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

Steps to import a file

  1. Click the Options button Options button on the upper right side of the screen and click Import from File. Screenshot: Selecting the menu option on the "View" screen If Import from File is not displayed, you need to be granted the "Import from file" permission in the Permissions for App setting.

  2. Click Browse and select a file to import. Screenshot: The screen to select a file to import

  3. Select either of the radio buttons displayed under Select Data Scope.
    If your file has column names in the first row, select First row is header. Screenshot: Screen to specify whether the first row of the file is header Depending on the content of your file, First row is header may be automatically selected.

  4. Check that the content of your file is correctly displayed in the Preview section.
    Screenshot: The preview of your file for import 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.
  5. 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"
    Screenshot: 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.

    • 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 created 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.
    Screenshot: Display format of table fields

  6. When updating existing records, select the Key to Bulk Update check box.
    Reference: (b) Key points for specifying "Key to Bulk Update"
    Screenshot: Checking the "Key to Bulk Update" check box The following are the fields that can be set as Key to Bulk Update:

    • Record number
    • Text
    • Number
    • Date
    • Date and time
    • Link
  7. 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 created, specify the corresponding file columns for the fields displayed in the Record Creation/Update Information section.
    Screenshot: Specifying 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 setting.

    • 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 created records, and the date and time of the operation is registered in the "Created datetime" and "Updated datetime" fields of the records.
  8. Click Import on the upper left side of the screen. Screenshot: Clicking "Import"

When the file import starts, you are automatically navigated to the app's "View" screen.
Screenshot: The screen displayed while the file is being imported 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.

If your Import from File operation failed, refer to What to Do If Bulk Adding/Updating of Records Fails for the solutions.