Search:  

Simple csv import

A common requirement is to import a simple csv list into a single table field. The technique shown on this page shows how to use a couple of components to easily import a comma separated list.

The example shows how to import a list of countries for use in an address table.
The technique can be applied to any similar structure.

See also:
neatComponents also provides a comprehensive scripting method of importing multiple column csv files into multiple table fields. See Bulk CSV Import...

Importing a list of countries

Components required

First table containing the 'Location' fields - called Location

Second table - called Country:Temp

Data Entry Form

Method

Add a Record Identifier field to each table.

1 - In the Location-table

Create a Field of the type: Text.

Call it Country 

2 - In the Country:Temp-table

Create a Field of the type: Multiple Record Link.

Call it Country

Configure as shown.

 

3 - In the Data Entry Form

Set the form to refer to the Country:Temp table.

Embed the prompt and field, and a submit button as shown below in the Edit Text - Record Edit View. 

After embedding the field, Edit its Properties and set Input Format to [Free-form]

Tip:
Don't forget to switch the View from Default to Custom in the DEF Behavior Editor setting so that you can see the form after you have created it.

 

4 - Copy, Paste and Submit

Open the csv file in Notepad. It should consist of a single column of entries, one per line.

If they are all on one Row, return to Excel and use the Transpose function.

Select all and copy to clipboard.

Open the Data Entry Form, and paste the entries into the text box.

Click the Submit button

The Location Table, Country field will be populated with the list of countries.

The paging value is created automatically.

Copyright © 2023 Enstar LLC    All rights reserved Print this pageTranslate: