Dataform Import Export

From Learnit docs
Revision as of 10:51, 16 May 2019 by Docsadmin (talk | contribs) (Created page with "{{Dataform}} {{Dataform Docs Note 1}} ==CSV== You can import and export Dataform entries in a csv format via a CSV view. You can have multiple import/expo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Dataform Template:Dataform Docs Note 1

CSV

You can import and export Dataform entries in a csv format via a CSV view. You can have multiple import/export templates in an activity by adding multiple instances of CSV view type and setting each instance to include the desired subset of activity content. With view level access control you can control who can import/export and what content.

CSV means Comma-Separated-Values and is a common tabular format for text interchange. CSV formatted text can look something like:

 name,height,weight
 Kai,180cm,80kg
 Kim,170cm,60kg
 Koo,190cm,20kg

Import

You can add new entries to a Dataform activity by importing their content from a csv file or csv text. The import form will display all the field patterns from the Entry template that are import-applicable and for each pattern additional import settings. You can either upload a csv file to the filepicker or paste csv formatted text into the 'CSV Text' field. The expected file format is a plain text file with a list of field names as the first record. The data then follows, one record per line. The field delimiter defaults to a comma character and the field enclosure is not set by default (field enclosures are characters that surround each field in each record). The CSV records should be delimited by new lines (usually generated by pressing RETURN or ENTER in your text editor). Tabs can be specified using \t and newlines by \n.

Do not put spaces after your commas or upload will fail!

Export

When using the CSV format, the user can select either the comma, semicolon, or tab to separate the fields. The selection of the proper character is important. If users select to use a comma to separate the fields and some of the fields contain data with commas then the number of columns is going to be misaligned and likely cause confusion.

The content to export is determined by the field tags you include in the view template. The subset of entries export can be controlled by applying available filters to the export view.

To export the displayed entries in the export view, click on the Export pushbutton. You will usually have the option of either opening or saving the file.

Fields' options

(This list includes only internal and standard fields. For csv import options of add-on fields please consult the respective field's page)

Template:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table rowTemplate:Dataform importable exportable field table row

Portfolios

Export

TBC