> ## Documentation Index
> Fetch the complete documentation index at: https://docsy3.mile.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk add and edit

> Add or update many records at once, from a spreadsheet or by typing them into a table.

> [!NOTE]
>
> Required permission:
>
> * View data source
> * Create data and Edit data source

Bulk adds new records and updates existing ones in the same go. A row whose **Title** matches an existing record updates that record; any other row creates a new one.

Open **Data Source**, pick the data type in the list beside the records, click the arrow beside **New** and choose **Bulk**. The **Bulk create and update** dialog opens.

![Bulk create and update](https://mintcdn.com/mile-app/JlYib2YfcGFk65pR/images/v4/workflow/data/data-source-bulk.png?fit=max\&auto=format\&n=JlYib2YfcGFk65pR\&q=85\&s=0499cabb8335218e16944ae202dd4293)

1. **Download template**: a spreadsheet with one column for each field of the data type, plus **Hub** for data types with **Scope Data by Hub** on and **Scope Data by User** for data types with **Scope Data by User** on.
2. **Upload file**: choose the filled-in file, or drop it here. An .xlsx or .xls file made from the template, up to 5 MB.
3. **Fill manually**: type the records into a table instead of uploading a file.

## Upload a file

1. Click **Download template** and fill in one record per row.
   * **Hub**: one hub name per row. To add the same record to another hub, add another row with that hub name. Each hub gets its own record.
   * **Scope Data by User**: user emails, separated by commas. Leave it empty for everyone.
   * **Checkbox**: `TRUE`, `FALSE`, `1`, `0`, `yes` or `no`.
   * **Coordinate**: latitude and longitude, such as `-6.2,106.8`.
   * **Relation**: the Title of the linked record.
2. Drop the file on **Upload file**, or click to choose it. XLS and XLSX files up to 5 MB are accepted. A file with no data rows, or with a blank column header, is refused with a message saying why.
3. Match each column of your file to a field. Columns with the same name as a field are matched for you. Every required field needs a column. Click **Next**.
4. The rows open in a table. A row with a problem is outlined in red, and each invalid cell says what is wrong under it. A small card at the top of the table, which stays there as you scroll, says how many rows need fixing; use its arrows to jump between them. Fix the cells in place, or remove a row with its bin.
5. Click **Save**. A progress bar shows how many rows are done, for example *Importing 200 of 450 rows...*; the dialog can't be closed until it finishes. A summary then shows how many records were saved, with a bar and a count of those **created**, **updated** and **failed**, and the reason for each failed row. If the import stops partway, the rows it did not reach are listed as failed with the reason. Click **Download failed rows** to get those rows in a file with an **Error** column, fix them and upload the file again. Click **Done**.

If you changed the data type after downloading the template, the web app asks you to download the template again before importing.

### Files with more than 2,000 rows

A file with more than 2,000 rows can't be checked row by row in the dialog. The web app asks **Process in the background?**; click **Continue**. The rows are then checked and imported on the server. The dialog shows the progress, and you can close it while the import keeps running. Follow it in [Import](https://docsy3.mile.app/pages/export-import/import.md).

## Type the records in

Click **Fill manually**.

![Fill manually table](https://mintcdn.com/mile-app/JlYib2YfcGFk65pR/images/v4/workflow/data/data-source-bulk-manual.png?fit=max\&auto=format\&n=JlYib2YfcGFk65pR\&q=85\&s=ecf35f11191de1cf1822bb770b331b6b)

1. One column for each field. Required fields are outlined.
2. **Add row**: add another record.

Fill in the rows the same way as the file: type values, pick options and relations from lists. To start over, **Delete all data** clears every row after asking **Delete all data?**. Click **Save** when you're done.

If you close the dialog with unsaved rows, the web app asks **Discard this bulk entry?**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.