Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 5.37 KB

File metadata and controls

49 lines (32 loc) · 5.37 KB
description
Hierarchical lists contain records that can have parent and child records. These hierarchical lists can consist of only one field, or of several fields.

Hierarchies

The CSV file must contain a column header. This can be freely assigned. It is recommended to use meaningful names, as these names will be used later during the mapping. If the column headers in the CSV file correspond to the internal field names in FYLR, the field mapping is done automatically.

{% hint style="info" %} Please also check to the general information. {% endhint %}

Example Files "Locations"

IDLEVEL 1LEVEL 2LEVEL 3
1Germany
2Berlin
3Brandenburg
4Potsdam
5United Kingdom
6Scotland
7Glasgow
8England
9London
10Brighton
11Manchester

Alternatively, the data can also be structured as follows. However, it is important that each level appears in its own row in the CSV file (lines 1, 3, 5, 6, 8 must not be omitted):

IDLEVEL 1LEVEL 2LEVEL 3
1Germany
2GermanyBerlin
3GermanyBrandenburg
4GermanyBrandenburgPotsdam
5United Kingdom
6United KingdomScotland
7United KingdomScotlandGlasgow
8United KingdomEngland
9United KingdomEnglandLondon
10United KingdomEnglandBrighton
11United KingdomEnglandManchester

In addition, it is possible to import the hierarchies as follows. However, it is important that each level appears in its own line in the CSV file (lines 1, 3, 5, 6, 8 must not be omitted):

IDPARENT RECORDNAME
1Germany
2GermanyBerlin
3GermanyBrandenburg
4BrandenburgPotsdam
5United Kingdom
6United KingdomScotland
7ScotlandGlasgow
8United KingdomEngland
9EnglandLondon
10EnglandBrighton
11EnglandManchester

In the import mapping, the field "id_parent" must be selected for the column "PARENT RECORD" and the corresponding field for the column "NAME". If your file contains parent records that are not yet available in your database, you have to perform the import twice. In the first step all records are created and in the second import run the links between parent and new child records are created. In that case it is required that in the import settings the "Field for Updates" was selected over which the matching should take place (in our example e.g. "ID").

{% hint style="info" %} If you want to export a hierarchical list from FYLR and import it afterwards, you have to select "Hierarchies as Columns" when exporting. {% endhint %}

Example File "Categories"

IDLEVEL 1LEVEL 2COMMENT
1PersonsThis category includes, for example, employee photos or photos of events.
2Buildings
3Building #1This building was the former seat of the department XYZ. Currently, the department ABC is located there.
4Building #2The building was built in 1986.

Import Procedure

  • first open the CSV importer
  • upload your CSV file
  • select "1st Row" for "CSV Field Names"
  • select the target object type and the corresponding mask
  • switch to the tab "Import Mapping" and select the same target field for each column containing hierarchical data and enter the level number (attention: the first level must start with 0)
  • for all other columns in the CSV also select the corresponding target fields (e.g. for "Comment")
  • switch back to the "Import Settings" tab and select the "Update Field" if there are already records in the list that should be updated if necessary
  • click on "Prepare" and you will get an overview of how many rows will be imported or updated
  • then the actual import / update can be started