Most teams already keep their sites, assets or clients in a spreadsheet. Rather than typing them in, you can import the spreadsheet, either as a brand new model or into a model you have already set up.
Before you start
- The file can be a CSV (
.csv) or an Excel file (.xlsxor.xls), up to 5 MB. - Only the first sheet of an Excel file is read.
- A spreadsheet can hold up to 10,000 rows.
- The first row should hold the column headings.
Importing always adds new records. It does not update records you already have, so import each spreadsheet once.
Where to import from
There are two ways in:
- Admin settings › Import, under Configuration. This needs the Manage models permission, and can create a new model or import into an existing one.
- From a model's record list, open the More actions menu and choose Import data. This imports straight into that model, and needs permission to create its records.
The import runs through six steps: Source, File, Columns, Review, Import and Done.
Importing as a new model
Use this when the spreadsheet is the first time Trysquare has seen this kind of record.
- On Source, choose Import as a new model.
- On File, drag the spreadsheet in or click Browse.
- On Columns, check Review the proposed model. Trysquare has guessed a field type for each column from what is in it. For each column you can change the label, the type and whether it is Required, and you can set the Model name and Plural name.
- Click Check the spreadsheet.
The guesses are a starting point, so it is worth a look. A column with only a handful of values that repeat, such as a condition or a region, is suggested as a Single choice. A column with no blanks is suggested as required. Relation fields cannot be created by an import: add them in the model editor afterwards.
Importing into an existing model
- On Source, choose Import into an existing model, pick the Model, and click Continue.
- On File, add the spreadsheet.
- On Columns, under Match your columns, choose the field each column goes into, or Don't import for columns you do not need. Trysquare pre-fills the matches it can find. Required fields are marked (required), and every one of them needs a column.
Relation fields are listed under Unavailable fields, because relation fields cannot be imported. Fill those links in on the records after the import.
Reviewing and fixing problems
The Review step checks every row before anything is saved.
If every row is valid, it tells you how many records will be added. Click Import to add them.
If any row has a problem, nothing is imported. Trysquare lists each problem by row and column, such as a missing required value or a number outside the field's limits, and shows up to 100 of them. Correct the spreadsheet and upload it again, or click Edit columns to change the mapping, then check again.
Because an import is all or nothing, you never end up with half an import to tidy up.
When the import finishes
While it runs, the import shows its progress. When it is done, Import complete shows how many records were added, with View to open them and Start a new import for the next file.