While on the surface repeatable sections and record link fields appear similar, they act and appear different in the field. It can get a little confusing when trying to understand which to use during the form creation process.
The main differences between repeatable sections and record link fields are the relationship it has with other fields in the form. Repeatable sections allow for a one-to-many relationship, while the record link field can be used for a many-to-many relationship.
Record linking was originally designed for lookup table functionality, where data from the linked record can be pulled into the record with the record link field. This is possible when a single record is linked through the record link field.
Linked Records versus Child Records
The materials & Services repeatable section allows the user to collect multiple cases of materials and services that the service provider conducted on the inspection.
The repeatable section creates sub-records with the data from the fields nested within the repeatable section, which we refer to as child records. These child records are directly linked to the record that they are created in and can not be linked directly to any other parent record.
Alternatively, when using a record link field to create a new ‘sub-record’, that record is stored in the app that is linked to the record link field. This relationship allows you to locate and reference this record in other records that are made in the app with the record link field. Allowing you to have a single linked record linked to many 'parent' records.
The materials section has a linked record field, where users can find the material and services that they used and auto populate the hidden fields with values.
Lastly, since the data captured in a record link field is stored as individual records in another app, the records in the linked app can be used to auto-populate data from the linked record into the main record. Giving you the ability to use record linking as for lookup table functionality.
When exporting repeatable sections, the exported ZIP folder will contain separate data files for the main record data and the child record data.
Alternatively, when exporting records with record link fields, the linked app’s data is not automatically included in the exported ZIP folder. You must run an additional export for the linked app fields. (You could also use the auto population functionality to pull in specific field values from the record linked app.)
Linking Data Together Outside Of Fulcrum
The child data file from a repeatable section will contain two columns that link the child record to its parent record. The first column is called
fulcrum_parent_id. This column contains the fulcrum_id (record ID) of the immediate parent for the child record. The second column is called
fulcrum_record_id. This column will be filled with the fulcrum_id (record ID) of the root level record. So in the event that you have nested repeatable section, you will be able to link the child record to both the root level record and its immediate parent record.
Unlike repeatable sections, to link records back to each other outside of Fulcrum, you will need to look at the data file that holds the data for the app that has the record link field in it (parent data file). In the column that stores the record link data, you will see the fulcrum_id (record ID) of the linked record(s). This column can be used to locate the correct ‘sub-records’ in the data file that was exported from the app that is linked to the record link field.