Importing List of Values options from text, CSV, or JSON files
This article walks through the process for creating a text, CSV, or JSON file in an acceptable format and importing it into the app to populate a list-of-values attribute's options.
Here's a video of the attribute and list upload in action.
Our List-of-Values attribute helps ensure that collecting data in the field is easy, quick, and valid. In cases where the list of valid values is large, you can import the list of options from a plain text file, a CSV file, or a JSON file. Let's walk through this process step-by-step.
The first step is choosing the file type that’s easiest for you and ensuring it meets the expected format so that the app can read the values correctly.
The simplest option is a .txt file. In this case, the app expects a comma separated list of values. For example, a .txt file with this content:
Option1,The second option,A. Third. Option.,123Will produce an attribute with the following selections:
Option1
The second option
A. Third. Option.
123
We also support .csv files, in which case the app will look for a column with the header value of “name” or “label” and read the values in that column. If no column has a matching header value, the app will read all of the values in the first column. Null, nil, or empty rows are ignored.
For example, a CSV file with the following contents:
id
Name
Value
1
Option 1
10
2
The second option
20
3
A. Third. Option.
30
9
null
90
8
nil
80
4
40
5
123
50
Will produce an attribute with the same selections as above:
Option1
The second option
A. Third. Option.
123
Download a template CSV file below for an easy way to add your options and import them.
Lastly, you can also import .json files. For JSON, you can either provide a flat array of values like [”Option 1”, “The second option”, "A. Third. Option.", 123], or you can provide an array of objects.
When providing an array of objects, each object must contain the all of the same properties with the same data type, and one of the properties must have the key of “name” or “label”. The app will read this property to create the list options. Null or Empty values are ignored.
For example, a .json file with these contents:
Will produce the following options after import:
Option 1
The second option
A. Third. Option.
Now that we have a valid file to import, let’s see how to apply it to a feature class.
Find or create the feature class that needs the attribute and find or create the list of values attribute which will utilize the new options. In this case, we’re editing a Point feature class named “Nest” with a List of Values attribute named “Bird Species”. I’m going to import a CSV of bird species from the British Trust for Ornithology (BTO) with 636 different species (download the file below to try for yourself).
First I tap the “Import from File” Button:

Then I select the file from the popup:

And that’s it! As we see below, all of the species have been imported from the “label” column of the CSV.

Now that we’ve added all the possible bird species as options for our attribute, we can be certain that the data collected in the field will match what we expect without any additional processing. For those of you in the field, a list with 600 options might sound like a real pain to scroll through, but thankfully our attribute select interface has a search box so you can find the option you need in just a couple of taps:

Tap on the search box and begin typing and the options will filter out in real time with every additional character.

The List-of-Values attribute is an easy, quick, and convenient way to reduce post-processing data correction work without making your field team's job more difficult.
Last updated