Skip to content

Import Data

Feature Description

Open the data table record import page, where users can import data through three methods: Excel, CSV, and Copy table from Excel or web page

Parameter Settings

Configuration ItemDescription
Data TableRecord's data table type
Allow Users to Select the Following Fields for ImportSet the fields that users are allowed to import
Default Mapping RelationshipSet the default mapping relationship between columns and fields
Field Default ValuesDefault values for fields when imported data is empty
Import Data as Association List of Main TableWhen enabled, imported data will be added to the Association List field of the specified record
Main TableSelect the data table where the association list field is located
Association List Field of Main TableSelect the association list type field for the data to be imported
Main Table Record IDGet the main table ID for data import through an expression

Example

In the data table module, we need an import button. Clicking this button allows users to batch import records of the data table. For example, in the employee information module, we want to quickly create employee information through import. In the toolbar of the employee information module shown below, click the create button to upload data. After completing data upload, select the mapping method for importing data, and then click save to complete data import.

To implement the above import button, you need to add a button to the toolbar of the data table module, select Import Data as the execution action in the configuration item, and select the module that needs to import data in the Data Table configuration item. In this case, we select the current table (Employee Information). In the configuration item Allow Users to Select the Following Fields for Import, select the fields that users are allowed to import. In this case, we select Name, Gender, Entry Time, and Employment Status. The configuration item Default Mapping Relationship can set the default import fields in different columns. In this case, we select Name for the first column, Gender for the second column, Entry Time for the third column, and Employment Status for the fourth column.

When importing data, if we want to set default values for the imported data fields, we can achieve this through the configuration item Field Default Values. For example, if we want to set the default employment status of imported member information to Employed, add the Employment Status field in the Field Default Values configuration item, and enter the identifier of the Employed option in the field value.

In addition to importing data into the data table module, data import also supports importing data into association list type fields.