# Importing and exporting data

# Export excel

Export will create and download a file readable by Microsoft Excel or any other 3rd party Office product.

Export file options include

- **All records**: Unlike the default limited to the records displayed in this page
- **All fields**: Unlike default limited the fields displayed in the current view
- **Explode parents**: Include data from related **parent** records
- **Explode children**: Include data from related **child** records in denormalized (flattened) form
- **System export**: Use system name in columns (good for later [CSV imports](https://docs.tsnocode.com/books/features/page/import-csv "Usermanual/ImportCSV"))

After downloading the file you should save it in you preferred format using "Save as ...".

# Exporting for Print

Print view will display the current page with certain elements removed

- Website wrapper (menus, headers and footers)
- Tempus Serva navigation (menu and pagers)
- Links and optional features

Furthermore single records will be displayed in display mode (edit elements are removed).

# Import CSV

The import function allows selected users to upload data, for either creation of new or update of existing records.

## <span class="mw-headline" id="bkmrk-using-import-1">Using import</span>

All normal restrictions are in place, so there will be no difference between imported and data entered manually through regular forms.

During import each line in the import file is handled as a separate job. Consequently some lines may fail and some lines may succeed: The results can be retrieved after the import where a modified version of the import file including the success/failure status information, will be returned to the user. This file makes it easy to error correct, as the the format is exactly the same as the import file.

## <span class="mw-headline" id="bkmrk-import-format-1">Import format</span>

Import files must apply to the following restrictions

- File content is in **CSV format**
- Column names should use the field **system name**.

The easiest way to build a working import template, is making a [Excel file export](https://docs.tsnocode.com/books/features/page/export-excel "Usermanual/ExportXL") with the "System export" option enabled.

## <span class="mw-headline" id="bkmrk-options-1">Options</span>

Imports can have certain options included that change what happens during the import

- Continue on errors: Do not stop processing on single field errors
- Ignore empty values: Empty values are never processed (default: treat as "" or null)
- Disable codeunits: Disable custom functionality
- Disable validation: Disable field restrictions

Warning: Do not use the last two options (codeunit/validation), unless you 100% certain how the solution works.

## <span class="mw-headline" id="bkmrk-enabling-user-profil-1">Enabling user profiles</span>

Add the role data handler for the users that should be allowed to import data

Designer &gt; Users &gt; Edit users &gt; \[USER\] &gt; "Data handler"

# List all contacts

This function will provide you with a list of all **contacts** related to the currently displayed records.

- In case of multiple contact fields, the list wil collect them from all available fields.
- Note that search criterions are active and will refer to the parent items, not the tasks themselves.

# List all emails

This function will provide you with a list of all **emails** related to the currently displayed records.

- In case of multiple email fields, the list wil collect them from all available fields.
- Note that search criterions are active and will refer to the parent items, not the tasks themselves.

# List all files

This function will provide you with a list of all files related to the currently displayed records.

In case of multiple file fields, the list wil collect them from all available

- Document fields
- Picture fields

Note that search criterions are active and will refer to the parent items, not the tasks themselves.

# List all tasks

This function will provide you with a list of all **tasks** related to the currently displayed records.

- In case of multiple task fields, the list wil collect them from all available fields.
- Note that search criterions are active and will refer to the parent items, not the tasks themselves.