Difference between revisions of "Importing data from XL"

From TempusServa wiki
Jump to navigation Jump to search
Line 9: Line 9:
* Field system names are used by default ('''Allow field display names''')
* Field system names are used by default ('''Allow field display names''')


== Field references ==
== 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''').  
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'''.
An easy way to get the file format right is to export a couple of records and choosing '''System format'''.
Line 17: Line 17:
* 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 28: 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.

Revision as of 05:54, 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.