Difference between revisions of "Importing data from XL"
(Created page with "== How to import data == When importing a file you can either update or insert records. After the import is handled a file containing the results are returned to the user. General rules using the import * Validation rules applies by default * Codeunits are triggered by default * Field system names (uppercase) are used by default == Field references == Data plays a special role in regard to what you want to do * When creating data the DataID may NOT be included * Wh...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
General rules using the import | General rules using the import | ||
* Validation rules | * Validation rules apply by default ('''Disable validation''') | ||
* Codeunits are triggered by default | * Codeunits are triggered by default ('''Disable codeunits''') | ||
* Field system names | * Field system names are used by default ('''Allow field display names''') | ||
== Field | === Field names === | ||
Field names should use the system format (uppercase without any special characters), but it is possible to allow display name during imports ('''Allow field display names'''). | |||
An easy way to get the file format right is to export a couple of records and choosing '''System format'''. | |||
'''DataID''' plays a special role in regard to what you want to do | |||
* When creating data the DataID may NOT be included | * When creating data the DataID may NOT be included | ||
* When updating data a valid DataID MUST be applied | * When updating data a valid DataID MUST be applied | ||
=== Field values === | |||
Generally values must abide by the same restrictions as during form interaction. | |||
* Validation | |||
* Dependency | |||
In case of lookup or relational fields just insert the value displayed (not the ID). A failure to match a value will result in that record being imported/updated. | |||
It is however possible to skip the handling of fields on certain records by | |||
* Leaving the value empty | |||
* Checking the import option '''Ignore empty values''' | |||
== Troubleshooting == | == Troubleshooting == | ||
Line 27: | Line 38: | ||
* Status field was left empty | * Status field was left empty | ||
* Values in lookup fields are misspelled | * Values in lookup fields are misspelled | ||
Errors during import will be documented in detail in the backend Events. |
Latest revision as of 04:55, 19 August 2022
How to import data
When importing a file you can either update or insert records.
After the import is handled a file containing the results are returned to the user.
General rules using the import
- Validation rules apply by default (Disable validation)
- Codeunits are triggered by default (Disable codeunits)
- Field system names are used by default (Allow field display names)
Field names
Field names should use the system format (uppercase without any special characters), but it is possible to allow display name during imports (Allow field display names). An easy way to get the file format right is to export a couple of records and choosing System format.
DataID plays a special role in regard to what you want to do
- When creating data the DataID may NOT be included
- When updating data a valid DataID MUST be applied
Field values
Generally values must abide by the same restrictions as during form interaction.
- Validation
- Dependency
In case of lookup or relational fields just insert the value displayed (not the ID). A failure to match a value will result in that record being imported/updated.
It is however possible to skip the handling of fields on certain records by
- Leaving the value empty
- Checking the import option Ignore empty values
Troubleshooting
Complete failure to import can be caused by
- Used field name display values
- Forgot DataID column in an update
- Included DataID column in an insert
Errors in single records could be caused by
- Some required fields are missing
- Status field was left empty
- Values in lookup fields are misspelled
Errors during import will be documented in detail in the backend Events.