Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision |
import_and_export:importing_regions [2021/08/11 15:02] – Gary Willetts | import_and_export:importing_regions [2021/08/11 15:16] – [Doing the import] Gary Willetts |
---|
| |
===== Doing the import ===== | ===== Doing the import ===== |
Go to the //File > Import > Import assets// menu and you will be asked to select the import file from a file window. After you have selected the file (if it is valid) you will be shown this window: | Choose //File > Import > Import regions// from the menus and you will be asked to select the import file from a file window. After you have selected the file (if it is valid) you will be shown this window: |
| |
{{ :import_and_export:screenshot_2021-04-19_at_15.35.02.png?600 |}} | {{ :import_and_export:screenshot_2021-08-11_at_16.03.40.png?400 |}} |
| |
mSupply uses the **code** field to determine whether the asset being imported is a duplicate; an asset with the same code as one already in the database is determined to be a duplicate. Any assets with no code are ignored during duplicate checking i.e. an asset with no code can //never// be a duplicate and will always be imported as a new asset. In the //If duplicate codes are detected// section you tell mSupply what to do if it encounters a duplicate asset during the import: | mSupply uses the **Region** field to determine whether the region being imported is a duplicate; a region with the name as one already in the database is determined to be a duplicate. In the //If a duplicate is detected// section you tell mSupply what to do if it encounters a duplicate region during the import: |
* **Import as new asset:** this option will import the duplicate as a new asset | * **Import as a new region:** this option will import the duplicate as a new region |
* **Skip the duplicate without asking:** the duplicate will not be imported and that row of the spreadsheet will be ignored | * **Skip the duplicate without asking:** the duplicate will not be imported and that row of the spreadsheet will be ignored |
* **Stop the import:** as soon as a duplicate is encountered, the import will stop and all assets imported so far will be removed so that nothing is imported. | * **Stop the import:** as soon as a duplicate is encountered, the import will stop and all regions imported so far will be removed so that nothing is imported. |
* **Update the existing asset:** the asset that already exists with the code in the database will be updated with the information contained in the spreadsheet row. A new asset will not be created. BE CAREFUL WITH THIS OPTION: if a cell is blank in the spreadsheet then the corresponding value is removed from the asset (if it had a value set for it), not left as it is. | * **Update existing region:** the region that already exists with the name in the database will be updated with the information contained in the spreadsheet row. A new region will not be created. |
| |
The //Field// column of the table shows you all the columns that mSupply has detected in your import file, the //Value// column shows the values it has found in the cells for that row of the spreadsheet. You can move through the rows of the spreadsheet using the **Previous** and **Next** buttons. If you try to go beyond the first or last row of the spreadsheet mSupply will let you know. | The //Value// column shows the values mSupply has found in the cells for that row of the spreadsheet. You can move through the rows of the spreadsheet using the **Previous** and **Next** buttons. If you try to go beyond the first or last row of the spreadsheet mSupply will let you know. |
| |
You can carry out the import by clicking on the **Import now** button or cancel it by clicking on the **Cancel** button. | You can carry out the import by clicking on the **Import now** button or cancel it by clicking on the **Cancel** button. |
| |
When the import has finished you will be shown a message telling you how many assets were imported and how many rows of the spreadsheet were skipped, ignored or failed. | During the import: |
| * if the row has no region name it will be skipped |
| * if the row has an empty Geometry field, it will be imported with no geometry |
| * if the row has content in the Geometry field that does not match the geoJSON FeatureCollection schema it will be skipped |
| * if the parent region does not exist or is empty the region will be imported with no parent |
| |
<WRAP info center round 90%> | When the import has finished you will be shown a message telling you how many assets were imported and how many rows of the spreadsheet were skipped. |
All the assets created by the import will have the text "Created by import on //xx/xx/xxxx//" (where //xx/xx/xxxx// is the date of the import) appended to the end of their //Notes// field. | |
</WRAP> | |
| |
\\ | \\ |