logologo
Get Started
Guide
Development
Plugins
API
English
简体中文
Get Started
Guide
Development
Plugins
API
English
简体中文
logologo
Overview

Blocks

Overview

Data Blocks

Table
Form
Details
List
Grid Card
Chart

Filter Blocks

Form

Other Blocks

Action Panel
Iframe
Reference block
Markdown
JS Block

Block Settings

Data Scope
Layout
Block Linkage Rules
Field Linkage Rules
Sorting Rules
Block Deletion
Block Title

Fields

Overview

Generic Settings

Table Column
Detail Form Item
Filter Form Item
Form Item

Specific Settings

Date
File Manager
Sub-form
Select
Picker
Sub-table
Sub-detail
Title
JS Field
JS Item
JS Column

Field Settings

Default Value
Field Label
Show Label
Field Tooltip
Data Scope
Field Component
Number Format
Pattern
Required
Title Field
Validation Rules
Association Field

Actions

Overview

Action Settings

Edit Button
Double Check
Assign Values
Bind Workflow
Edit Popup
Action Linkage Rules

Action Types

Add New
View
Delete
Edit
Import
Import Pro
Export
Export Pro
Export Attachments
Filter
Link
Pop-up
Refresh
Submit
Trigger Workflow
Update Record
Bulk Update
JS Action
Action Permissions

Advanced

Linkage Rules
Event Flow
Variables
RunJS
Previous PageEdit
Next PageImport Pro

#Import

#Introduction

Import data using an Excel template. You can configure which fields to import, and the template will be generated automatically.

20251029165818

#Import Instructions

#Number Type Fields

Supports numbers and percentages. Text like N/A or - will be filtered out.

Number1PercentageNumber2Number3
12325%N/A-

After converting to JSON:

{
  "Number1": 123,
  "Percentage": 0.25,
  "Number2": null,
  "Number3": null
}

#Boolean Type Fields

Supported input text (English is case-insensitive):

  • Yes, Y, True, 1
  • No, N, False, 0
Field1Field2Field3Field4Field5
NoYesYtrue0

After converting to JSON:

{
  "Field1": false,
  "Field2": true,
  "Field3": true,
  "Field4": true,
  "Field5": false
}

#Date Type Fields

DateOnlyLocal(+08:00)GMT
2023-01-18 22:22:222023-01-18 22:22:222023-01-18 22:22:22

After converting to JSON:

{
  "DateOnly": "2023-01-18T00:00:00.000Z",
  "Local(+08:00)": "2023-01-18T14:22:22.000Z",
  "GMT": "2023-01-18T22:22:22.000Z"
}

#Select Type Fields

Both option values and option labels can be used as import text. Multiple options are separated by commas (, ,) or enumeration commas (、).

For example, the options for the Priority field include:

Option ValueOption Label
lowLow
mediumMedium
highHigh

Both option values and option labels can be used as import text.

Priority
High
low

After converting to JSON:

[{ "Priority": "high" }, { "Priority": "low" }]

#China Administrative Division Fields

Region1Region2
北京市/市辖区天津市/市辖区

After converting to JSON:

{
  "Region1": ["11", "1101"],
  "Region2": ["12", "1201"]
}

#Attachment Fields

Attachment
https://www.nocobase.com/images/logo.png

After converting to JSON:

{
  "Attachment": [
    {
      "filename": "logo.png",
      "title": "logo.png",
      "extname": ".png",
      "url": "https://www.nocobase.com/images/logo.png"
    }
  ]
}

#Relationship Type Fields

Multiple data entries are separated by commas (, ,) or enumeration commas (、).

Department/NameCategory/Title
Development TeamCategory1, Category2

After converting to JSON:

{
  "Department": [1], // 1 is the record ID for the department named "Development Team"
  "Category": [1, 2] // 1,2 are the record IDs for categories titled "Category1" and "Category2"
}

#JSON Type Fields

JSON1
{"key":"value"}

After converting to JSON:

{
  "JSON": { "key": "value" }
}

#Map Geometry Types

PointLinePolygonCircle
1,2(1,2),(3,4)(1,2),(3,4),(1,2)1,2,3

After converting to JSON:

{
  "Point": [1, 2],
  "Line": [[1, 2], [3, 4]],
  "Polygon": [[1, 2], [3, 4], [1, 2]],
  "Circle": [1, 2, 3]
}

#Custom Import Format

Register a custom ValueParser via the db.registerFieldValueParsers() method, for example:

import { BaseValueParser } from '@nocobase/database';

class PointValueParser extends BaseValueParser {
  async setValue(value) {
    if (Array.isArray(value)) {
      this.value = value;
    } else if (typeof value === 'string') {
      this.value = value.split(',');
    } else {
      this.errors.push('Value invalid');
    }
  }
}

const db = new Database();

// When importing a field of type=point, the data will be parsed by PointValueParser
db.registerFieldValueParsers({
  point: PointValueParser,
});

Import Example

Point
1,2

After converting to JSON:

{
  "Point": [1, 2]
}

#Action Settings

20251029170959

  • Configure importable fields

20251029171036

  • Linkage Rules: Dynamically show/hide the button;
  • Edit Button: Edit the button's title, type, and icon;