You can pre-populate a Repeatable Section widget with existing data by passing a JSON array to the form through a mapped process variable. Each object in the array represents a row in the repeatable section, and each property corresponds to a widget within that row.
To pre-populate a Repeatable Section widget, the input data must meet the following requirements:
-
JSON array structure
The input must be an array of JSON objects. Each object represents one repeated instance (row) in the section.
-
Matching field IDs
The property names in each JSON object must match the field IDs defined in the repeatable section. If the property names do not match the field IDs exactly, the data is not displayed in the form.
If the structure and field IDs are correct, the values are displayed automatically when the form is opened.
To make the data available in the Repeatable Section widget, you must store the JSON array in a process variable and configure input mapping in the form configuration to the repeatable section.
The following example pre-populates a Repeatable Section widget with two rows:
[
{
"FirstName": "John",
"LastName": "Smith",
"Amount": 10
},
{
"FirstName": "Jane",
"LastName": "Doe",
"Amount": 15
}
]
In this example, each object becomes a separate row in the Repeatable Section widget. The properties FirstName, LastName, and Amount must match the IDs of the corresponding widgets within the section.