This guide provides a better understanding of how to import data into repeatable fields. We will cover some important background information, then provide you with an example app from our gallery which you can use for testing to go through the import process.
It is important to understand how Fulcrum handles child records. Child records are elements of their parent records. This is significant for two reasons:
Whenever you are importing child records, there must be a column in the parent data file called
fulcrum_idand in the child data file there must be a column called
fulcrum_parent_idthat is populated with the
fulcrum_idvalue of the parent record. Both the parent and child files need to be uploaded at the same time. During the mapping step (Step 2 of the import process, below) you will map the parent file to the main app (app name) and the child data file to the repeatable section that will hold the child data.
If you are adding new child records or editing existing child records, you will want to make sure to select Update Existing Records in Step 1 of the import process. The only time that Create New Records should be selected is if you are importing data to create new parent records. When doing anything with the data importer, the Update Existing Records vs Create New Records always refers to the main parent record. Creating or updating repeatable items is still updating a parent record. All repeatable data lives within the main record.
Preparing for Import
We'll use our Park Inventory app to walk you through this process. You can find this App Template in App Gallery. This app is designed to capture general park information in the parent section and individual feature information in the child section.
If you want to follow this tutorial, then add This App to your account and create a few parent and child records for testing!
Getting some Sample Data
We will be working with existing parent data in this guide. After you’ve created a few parent/child records, run an Export (as
.csv) to get the data out of Fulcrum.
After downloading the export file, we can make some edits and additions to the child records in our favorite spreadsheet application. You may have edits to perform on the existing data or perhaps you need to add new data rows (which will create new child records).
Once finished with editing the data, we can begin the Import process. Place both the parent and child files into the same folder. Then compress the files together into a single
In the Fulcrum web editor, locate the app that will receive the imported data and click on the Import button. This will take you to the Import Wizard, which will guide you step by step.
Step 1. Upload file
This step is pretty straightforward. First, make sure that the correct app is selected in the Choose the App field. If you are adding new data, select Create New Records, if you are just updating the data from the export file, select Update Existing Records. Last, we will select the
.zip file to upload. Once you are done, click the 'Next' button.
Step 2. Select Tables
The second step of the import process is to map the files that you have uploaded to the corresponding destination in the app. You will want to map the parent data file to the parent destination (the name of the app is used) and map the child data file to the repeatable destination (the repeatable label is used). The system will automatically match the file names with the destination tables, however, in some cases, this process might need to be done manually. Once the destination Tables are set, click 'Next' to continue the import process.
Step 3. Georeference
Fulcrum will attempt to identify the correct columns to use for the location information for both the parent and child data. If you use column headers like lat and lon, latitude and longitude, or x and y, then the system should locate the correct columns. Otherwise, you can select what columns to use manually. Once the columns have been correctly set, then click the 'Next' button.
Step 4. Mapping Fields
Since we are working with a file that was exported out of Fulcrum, all the column headers should match the data names of the fields in the app. If you created your own file, then make sure you select the fields that match the information on the column headers of your file.
By default, columns that come from system fields like _server_updated_at or _updated_by, as well as the geometry related columns (_latitude, _longitude) are going to be skipped. You might notice that some other columns are skipped as well, if you wish to include the data, just select the right Target Field.
Step 5. Reviewing Issues
The review step is where Fulcrum reports any issues that might have come up. If there are no issues, this step will be skipped and you won’t see it. Some common issues here are when you are attempting to add a value to a choice list field that does not exist. Another common issue is not using the proper date format. You can also find an issue if you haven't included the photos as part of the .zip file.
It will be possible for you to continue with the import even if issues are presented, just keep in mind that the values that presented the issue are not going to be imported. The recommendation is to fix the issues and upload a new file. This means adding the missing choices to the choice list field, using the proper date format, and/or adding the missing images to the .zip file, and going back to Step 1.
Step 6. Summary
If you had no Issues in the previous step or if you decided to continue regardless, here you will see a summary with information that is about to take place with your import.
If everything seems fine, click 'Finish'. This will take you to the 'Imports' page, where you can see the progress of your Import process.
And that is it. Once the process is over, you will get a 'Complete' under the Step column, the number of records imported under the status, and 100% as the completed percentage.
Congratulations, you’ve successfully imported parent and child records to your App!