import_and_export:importing_assets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
import_and_export:importing_assets [2021/04/20 09:53] Gary Willettsimport_and_export:importing_assets [2022/01/19 15:27] (current) – [Import spreadsheet format] Gary Willetts
Line 1: Line 1:
-{{indexmenu_n>85}} +{{indexmenu_n>90}} 
- +====== 17.09. Importing assets ======
-====== 16.09. Importing assets ======+
 Assets are imported directly from Excel spredsheets so there is no need to export data from the spreadsheet to a tab delimited text file first (as you need to do for other imports). Assets are imported directly from Excel spredsheets so there is no need to export data from the spreadsheet to a tab delimited text file first (as you need to do for other imports).
  
Line 34: Line 33:
 | 13             | M              | Location code                   | 20 alphanumeric characters. The code the location name will have. Will be matched against the names currently in the database. If a name with this code does not exist, one will be created with the name provided in the Location name field. If the Location name field is empty the name will be created with the code as its name. This field is mandatory if you want mSupply to create the name.  | | 13             | M              | Location code                   | 20 alphanumeric characters. The code the location name will have. Will be matched against the names currently in the database. If a name with this code does not exist, one will be created with the name provided in the Location name field. If the Location name field is empty the name will be created with the code as its name. This field is mandatory if you want mSupply to create the name.  |
 | 14             | N              | Location name                   | 255 alphanumeric characters.  | | 14             | N              | Location name                   | 255 alphanumeric characters.  |
-| 15             | O              | Asset user name                 | 255 alphanumeric characters. The name of the asset user in the format "//last name//,//first name//". Will be created if the user does not exist as a contact of the location. |+| 15             | O              | Asset user name                 | 255 alphanumeric characters. The name of the asset user in the format "//last name//,//first name//". Will be created if the user does not exist as a contact of the location (the first and last names only are used to determine whether the asset user exists. Phone number and email address are ignored in the check). |
 | 16             | P              | Asset user phone number         | 255 alphanumeric characters | | 16             | P              | Asset user phone number         | 255 alphanumeric characters |
 | 17             | Q              | Asset user email                | 255 alphanumeric characters | | 17             | Q              | Asset user email                | 255 alphanumeric characters |
-| 18             | R              | Custodian location              | 255 alphanumeric characters. Where the custodian of theasset (the main person responsible for it) is located |+| 18             | R              | Custodian location              | 255 alphanumeric characters. Where the custodian of the asset (the main person responsible for it) is located |
 | 19             | S              | Custodian name                  | 255 alphanumeric characters. The name of the custodian | | 19             | S              | Custodian name                  | 255 alphanumeric characters. The name of the custodian |
 | 20             | T              | Custodian phone number          | 255 alphanumeric characters | | 20             | T              | Custodian phone number          | 255 alphanumeric characters |
 | 21             | U              | Custodian email                 | 255 alphanumeric characters | | 21             | U              | Custodian email                 | 255 alphanumeric characters |
 | 22             | V              | Current status                  | **Mandatory**. 255 alphanumeric characters. Will be created if it doesn't exist | | 22             | V              | Current status                  | **Mandatory**. 255 alphanumeric characters. Will be created if it doesn't exist |
-| 23             | W              | Proposed status                 | 255 alphanumeric characters. The proposed next status of the asset. Will be created if it doesn't exist |+| 23             | W              | Proposed status                 | 255 alphanumeric characters. The proposed next status of the asset. Will be created if it doesn't exist. Please note that there is no way of telling mSupply what proposed statuses are allowed to follow which current statuses during import. This can only be done manually in the asset settings (see the [[assets:assets_setup|]] page for details). During import all proposed statuses are assumed to be valid and will not be checked. There are, however, some important exceptions:\\ 1. If the current status of an asset is designated to be a final status, any proposed status will be ignored.\\ 2. If an imported asset has a current status which has some possible proposed statuses assigned, if the proposed status is not included in these, it will be added to them.\\ \\ So, be careful with the proposed statuses in the import file: you could make a mess if you have already set up which statuses can follow which and you don't follow that in the import file. |
 | 24             | X              | Type                            | 255 alphanumeric characters. Will be created if it doesn't exist | | 24             | X              | Type                            | 255 alphanumeric characters. Will be created if it doesn't exist |
 | 25             | Y              | Condition                       | 255 alphanumeric characters. Will be created if it doesn't exist | | 25             | Y              | Condition                       | 255 alphanumeric characters. Will be created if it doesn't exist |
Line 51: Line 50:
 | 30             | AD             | Disposal value                  | Number, currency. The value of the asset at the end of its useful life | | 30             | AD             | Disposal value                  | Number, currency. The value of the asset at the end of its useful life |
 | 31             | AE             | Insurer name                    | 255 alphanumeric characters | | 31             | AE             | Insurer name                    | 255 alphanumeric characters |
-| 32             | AF             | Insurance policy nummber        | 255 alphanumeric characters |+| 32             | AF             | Insurance policy number        | 255 alphanumeric characters |
 | 33             | AG             | Insurance renewal date          | Valid date in current operating system format. The date the insurance should be renewed by | | 33             | AG             | Insurance renewal date          | Valid date in current operating system format. The date the insurance should be renewed by |
 | 34             | AH             | Notes                           | Lots of alphanumeric characters! Any other information that needs to be stored against the asset | | 34             | AH             | Notes                           | Lots of alphanumeric characters! Any other information that needs to be stored against the asset |
Line 57: Line 56:
  
 Here is an example spreadsheet you can use (contains no property columns, only the standard mSupply columns): {{ :import_and_export:asset_import_blank_template.xlsx |}} Here is an example spreadsheet you can use (contains no property columns, only the standard mSupply columns): {{ :import_and_export:asset_import_blank_template.xlsx |}}
 +
 +<WRAP important center round 90%>
 +When entering dates in the spreadsheet, make sure they are counted as text in their cells. Sometimes Excel will autoconvert dates to //date// or //numerical// format and then they will import into mSupply as blank dates. You can make sure that dates will import correctly by using the row preview functionality (see below) - if the dates look correct here then they will import correctly.
 +</WRAP>
  
 ===== Doing the import ===== ===== Doing the import =====
Line 63: Line 66:
 {{ :import_and_export:screenshot_2021-04-19_at_15.35.02.png?600 |}} {{ :import_and_export:screenshot_2021-04-19_at_15.35.02.png?600 |}}
  
-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. 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 **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:
   * **Import as new asset:** this option will import the duplicate as a new asset   * **Import as new asset:** this option will import the duplicate as a new asset
-  * **Skip the duplicate without asking:** the duplicate will not be imported and that row if 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 assets 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 new information contained in the spreadsheet row. A new asset will not be created.+  * **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.
  
 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 //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.
Line 74: Line 77:
  
 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. 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.
 +
 +<WRAP info center round 90%>
 +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>
  
 \\ \\
 \\ \\
-|  //  Previous:  **[[import_and_export:importing_locations]]** | | Next: **[[import_and_export:export_items]]** //  |+|  //  Previous:  **[[import_and_export:importing_a_supplier_invoice]]** | | Next: **[[import_and_export:importing_regions]]** //  |
 ---- struct data ---- ---- struct data ----
 pagestatus.status    :  pagestatus.status    : 
 ---- ----
  
  • Last modified: 2021/04/20 09:53
  • by Gary Willetts