After reading this article you will know:
- What importing is
- How to enable importing
- How to create an importdefinition
- The options when importing
- How the import action works
Bettyblocks has its own import function inside the application. You can enable this function on any model you want. It enables you to import data from an Excel or CSV file directly into a model.
You can enable the import function on a model in the datamodel builder. Open the model and select the checkbox Allow import.
If you have enabled importing you will find a button Import next to the button New on your view. After clicking the button you can pick a file you want to import.
After uploading the file the import mapper will be shown. You get to see the first rows of data from your file and how the columns are named. You can then map these to the properties in your model.
After mapping the properties you can save this mapping as an import definition by checking the checkbox Save definition and giving the definition a name. You can use this definition the next time you are importing a file that has the same columns.
The import will start after you click next. The data will be added to your view and you will see a notification when the entire import has been processed.
This lets you choose an import definition that you have made before. It adds the mapping you have created the first time.
This option can be checked if you want to add new data but also have some data in your import that is already in your app. This will deduplicate the import data based on the property you set the deduplicate on. Make sure this is an unique value like an id.
When using deduplicate you can choose to update fields with the data in your import. This is used on records found while deduplicating.
You can set import options for roles and models. When editing a role you will find the option can import. When checked anyone with this role can import data into the models with the import function turned on. You can set create rights for roles on each model. When a role doesn't have the create rights for a model it also won't be able to use the import function on this model.
You can create an import action to import records from a file that is saved in your application. You will have to create an import definition before creating this action. The following items have to be set:
The record that contains the file that you want to import.
The import definition that you want to use to process the file.
The file property in which the file is stored. You can choose between all the file properties present on the selected object.