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 Item | Description |
|---|---|
| Data Table | Record's data table type |
| Allow Users to Select the Following Fields for Import | Set the fields that users are allowed to import |
| Default Mapping Relationship | Set the default mapping relationship between columns and fields |
| Field Default Values | Default values for fields when imported data is empty |
| Import Data as Association List of Main Table | When enabled, imported data will be added to the Association List field of the specified record |
| Main Table | Select the data table where the association list field is located |
| Association List Field of Main Table | Select the association list type field for the data to be imported |
| Main Table Record ID | Get 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.

