Send Data from a Repeatable Section to a SharePoint List
This recipe shows you how to send multiple rows of data from quality checks recorded in TrueContext to a SharePoint list. You’ll set up a form to include a Repeatable Section A Repeatable Section is a subform that contains a set of related questions. The data captured is “repeating”, because the field user can complete the same subform more than once, which creates multiple entries. so your technicians can enter multiple line items. Then, you’ll create a Microsoft SharePoint List Repeatable Destination A Repeatable Destination is a TrueContext Data Destination that sends data from a Repeatable Section to a field-based, third-party system. to map each entry from the Repeatable Section to a SharePoint list.
Available on the Advanced and Enterprise tiers:
Contents
Prerequisites
-
Your TrueContext account must be on the Advanced or Enterprise tier.
-
You must be a TrueContext Admin user.
-
Your team must have a Microsoft 365 connection configured.
Note:We recommend that you create a dedicated Integration User account for your Microsoft system and use that account to set up TrueContext Connections A Connection is an integration point that's used to link a TrueContext Data Source or Data Destination to an external service to import or export data. Data Destinations and Data Sources that share the same external service can also share the same Connection..
-
The SharePoint account you use for the connection must be in a group that has Edit, Design or Full Control permissions.
Scenario
Your field users perform random quality checks on a number of boxes of produce. They answer the same questions for each box when performing the quality checks. Your back office maintains a SharePoint list with records of all quality checks.They also store PDF documents for each quality check in a Microsoft SharePoint Document Library to capture rich data, such as images.
You can use TrueContext Repeatable Sections and Repeatable Destinations to:
-
Enable field users to add multiple entries in a Repeatable Section for the quality checks.
-
Create a SharePoint list based on data from the Regular and Repeatable Sections. In this example, the Repeatable Destination is configured to always create new items.
Info:PDF and structured data documents attached to a Data Destination A Data Destination specifies where to send data from a submitted form. You can use Data Destinations to automate data sharing and storage, routing data to a specific service (such as email or cloud storage) in several different formats. include valuable data and metadata. Send documents to SharePoint with a Microsoft SharePoint Document Library Data Destination to tap into the wealth of information provided in them.
High-level process
System | Action | Result |
---|---|---|
SharePoint | Navigate to an existing site to find the site name. | This site stores the SharePoint list that the Repeatable Destination creates. |
TrueContext | Build a form with questions in a Regular Section A Regular Section is a set of related questions grouped together for easy reference. The data captured is “non-repeating”. That is, field users enter a single instance of each answer.. | When a technician fills out the form, they only need to answer the questions in the Regular Section once. |
Add a Repeatable Section to the form with the Unique Identifier QualityQuestions. | The technician adds the quality checks as entries in the Repeatable Section. | |
Create a Microsoft SharePoint List Repeatable Destination. | This Repeatable Destination sends each entry in the Repeatable Section as a new item in a SharePoint list. | |
Configure your destination to create a new list in your Inspections site. | The system automatically creates the list in SharePoint. | |
Map the data from the Regular and Repeatable Sections in your form to your SharePoint list. | The destination adds an item in SharePoint for each entry in the Repeatable Section. It also adds the answers from the Regular Section on every item. | |
Add the Data Destination to the form, and then deploy the form. | When a technician submits the form, the destination creates the SharePoint list and creates items based on the data from the form. |
Step-by-step
In SharePoint
Navigate to an existing site. In this example, the site name is Inspections.
Result: The site URL includes the Site Prefix and Site Name.
In TrueContext
-
Create a new form.
-
Name the form Quality Check.
-
Add questions with the Unique IDs Inspector and DateInspection.
-
-
Add a Repeatable Section to your form:
ADD A SECTION > Repeatable
-
Enter QualityQuestions as the Repeatable Section Unique Identifier.
-
Add questions to your Repeatable Section. Take note of their Unique IDs.
-
-
Create a Microsoft SharePoint List Data Destination (Forms & Integrations > Data Destinations A Data Destination specifies where to send data from a submitted form. You can use Data Destinations to automate data sharing and storage, routing data to a specific service (such as email or cloud storage) in several different formats. > CREATE DATA DESTINATION > Microsoft SharePoint List).
On the Destination Basics tab:
-
Select the option to use as a Repeatable Destination.
-
Enter the Repeatable Section Unique Identifier QualityQuestions from step 2.
-
-
On the List Configuration tab, enter the Site Prefix and List Path as follows:
-
Site Prefix—Select
/sites/
. -
List Path—Enter the site name, and then use a DREL Data Reference Expression Language (DREL) is used to get form data and metadata and add it to a string, such as dates, usernames, or answers to questions in forms. expression to reference the form name.
Result: When the Data Destination executes, it creates a list called “Quality Check”, which is also the form name.
-
-
Map the questions in your form to columns in the SharePoint list:
-
Select the option to Always create new items.
-
Use the
%a[UniqueID]
DREL expression to reference answers from Repeatable and Regular Sections.
Note:-
The system adds answers from the Regular Section to each new item in the SharePoint list.
-
When creating new lists, the destination creates the columns you enter when it first executes.
-
-
Attach your Microsoft SharePoint List Data Destination to your form.
-
Open the form “Quality Check” in edit mode.
-
Select DESTINATIONS > ADD A DATA DESTINATION.
-
Select the destination you created in step 2.
-
SAVE AND DEPLOY your form.
-
-
In the Mobile App, open the form, enter data, and submit the form.
Result: The Data Destination creates a SharePoint list with items for each entry in the Repeatable Section.
Alternative configuration options
Update an existing SharePoint list
-
Enter the name of the list in the List Path field.
-
When you map answers to the list columns, enter the names of existing columns. TrueContext can’t create new columns in existing lists.
Result: The system maps data from submitted forms as items in an existing SharePoint list.
Update items in SharePoint
-
In the Column Mapping section, select the option to Update existing items.
Result: The system displays the Match column.
-
Select one or more columns to match on.
Result: The system updates the items with a matching value in the selected column.
Related topics
-
Learn how to configure a Microsoft SharePoint List Data Destination in more detail.
-
The topic Repeatable Sections: Building Repeatable Sections describes how to configure Repeatable Sections in detail.
-
You can map different form data and metadata to SharePoint. The topic DREL Quick Reference includes a list of all the DREL expressions you can use.