You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/pull_data_kobotoolbox.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ This article covers the following steps for pulling data from an external CSV:
18
18
19
19
To use `pulldata()`, first prepare an external CSV file containing the reference data you want to retrieve. Each row should represent a unique record (for example, a participant, location, or item) and the file should include at least two columns. One column must contain the **index variable** that matches the values entered in your form.
20
20
21
-
The index variable acts as the [primary key](https://en.wikipedia.org/wiki/Primary_key) that links your XLSForm to the external CSV. It should be a unique identifier that exists in both files, such as a participant ID, a district name, or another matching code.
21
+
The **index variable** acts as the [primary key](https://en.wikipedia.org/wiki/Primary_key) that links your XLSForm to the external CSV. It should be a unique identifier that exists in both files, such as a participant ID, a district name, or another matching code.
22
22
23
23
The remaining columns can include any additional details you want to retrieve, such as names, categories, or descriptions. Ensure the CSV file is clean, consistently formatted, and saved with the `.csv` extension.
24
24
@@ -28,7 +28,7 @@ Once you have set up your external CSV, configure your XLSForm in the following
28
28
29
29
1. Ensure your XLSForm includes a question that serves as the **index variable**.
30
30
2. Add a `calculate` field to your survey. Give the field a `name`.
31
-
3. In the `calculation` column, use the **pulldata()** function to specify which field in the CSV to pull from. Use the following syntax: `pulldata(‘csv’,‘pull_from’, ‘csv_index’, ‘${survey_index}’)`.
31
+
3. In the `calculation` column, use the **pulldata()** function to specify which field in the CSV to pull from. Use the following syntax: `pulldata('csv','pull_from', 'csv_index', '${survey_index}')`.
32
32
-`csv` is the name of the CSV file, without the extension.
33
33
-`pull_from` refers to the column in your CSV file that contains the data you want to import into your form.
34
34
-`csv_index` is the column in your CSV file that contains the **index variable.**
@@ -90,7 +90,7 @@ The final step in linking your external CSV file to your form is uploading the f
90
90
91
91
<details>
92
92
<summary><strong>Pulling dates from external CSV files</strong></summary>
93
-
If you are storing dates in an external CSV file and want to pull them into a form, ensure they are in the format YYYY-MM-DD. If you are editing your CSV in Excel, add a single quote (') in front of the date to avoid automatic date formatting in Excel.
93
+
If you are storing dates in an external CSV file and want to pull them into a form, ensure they are in the format YYYY-MM-DD. If you are editing your CSV in Excel, add a single quote <code>'</code> in front of the date to avoid automatic date formatting in Excel.
0 commit comments