The Collection component functions as a versatile container element, allowing you to iterate through a list of elements and display them according to their specific configurations.
output.put("processData", //this is the key{ "products": [ // this is the source that will populate the data on collection { "name": "Product One Plus", "description": "The plus option", "type": "normal" }, { "name": "Product Two Premium", "description": "This is premium product", "type": "recommended" }, { "name": "Product Basic", "description": "The most basic option", "type": "normal" }, { "name": "Gold Product", "description": "The gold option", "type": "normal" } ]});
The above configuration will render the Collection as shown below:
Components within a collection use relative paths to the collection source. This means that wherever the collection is found inside the process data, the components inside the collection need their keys configured relative to that collection.
To send and display dynamic data received on the keys you define to the frontend, make sure to include the following data structure in your root UI element using Message parameters. For instance, if you want to include data for the processData key mentioned earlier, your configuration should resemble this:
{ "processData": ${processData}}
When do you need Collection Prototypes?
Single layout for all items: If all items in your collection should display the same way, add one Collection Prototype and leave PIK/PIV empty
Multiple layouts based on item properties: If items should display differently based on their data (like the type field in the example above), add multiple Collection Prototypes with PIK/PIV configured
For detailed configuration guidance, see the Collection Prototype documentation:
Forms in Collections is a feature that enables you to create dynamic, repeatable forms within collection prototypes. This eliminates the need for custom development when building forms with repeatable sections like adding multiple co-debtors or comment entries.
Forms in Collections addresses common pain points in form design:
Dynamic Forms: No longer need custom development to support dynamic forms that show different form elements based on certain conditions
Repeatable Sections: Create forms with repeatable sections like adding co-debtors, comments, or any list of similar items
Flexible Validation: Support both individual item validation and bulk validation scenarios
The feature allows you to drag Form components directly into Collection Prototypes, where they automatically repeat for each item in your data array.
Collection source rules remain the same as regular collections. Each key in collection prototypes uses a prefix computed from the collection source and the index of the object being displayed. At runtime, keys are constructed with the full object path (e.g., application.clients[0].name).
Set up your process data with an array to hold the repeatable items:
// Define an object named 'application' to store client informationvar application = { client: { // Store the client's name name: "Aang the Last Airbender", // Store the loan amount details loanAmount: { amount: 238989, // The loan amount code: "USD" // The currency code for the loan amount }, // List of codebtors associated with the loan codebtors: [ { // First codebtor's name and occupation id: 1, name: "Sokka", occupation: "Boomerang Master" }, { // Second codebtor's name and occupation id: 2, name: "Prince Zuko", occupation: "Firebending Master" } ] }};// Output the client information from the application objectoutput.put("application", { "client": application.client });
2
Create the Collection component
In the UI Designer, add a Collection component
Set the Collection Source to point to your array (e.g., application.client.codebtors)
The collection will iterate through each item in the array
3
Add Collection Prototype with Forms
Add a Collection Prototype as a child of your Collection component
Configure prototype identifier. This is the key that will be used to identify the prototype.
Drag Form components directly into the Collection Prototype
Configure form fields with relative keys (e.g., name, email)
This is the key innovation: you can now place Form components directly inside Collection Prototypes, and they will automatically repeat for each collection item.
4
Configure form fields
Configure each form field using relative paths to the collection item data:
Use keys like name, email, type (not full paths)
The system automatically constructs the full path at runtime
Example: name becomes application.client.codebtors[0].name for the first item
Symptoms: Validation errors not showing or validation not working as expectedSolutions:
Ensure formsToSubmit includes the correct form identifiers
Check that form fields have proper relative keys configured
Verify the UI action is placed in the correct location (inside or outside prototype)
For individual saves, confirm the Collection Item Save Key is configured
Data not saving properly
Symptoms: Form data not persisting or appearing in wrong locationSolutions:
For individual saves: Ensure business rule updates the original array
For bulk saves: Verify Custom Key configuration captures the full array
Check key formation by examining the process data structure
Confirm the Collection Source points to the correct array
Can't hide form elements based on external variables
Limitation: Form elements within collections cannot be hidden based on variables outside the collectionWorkaround: Use keys from within the collection item object for conditional display. The mechanics of collections require using data from within the current collection item scope.
Can I hide form elements based on variables outside the collection?
No, the mechanics of collections require using keys from within the collection item object. You cannot use variables outside the collection scope to control form element visibility within the collection.
What happens to null values in form fields?
You can configure Exclude Keys in the UI action to handle null values. This prevents null or empty values from being included in the saved data.
How are keys formed at runtime?
Keys are constructed with the full object path including array indices. For example, a field with key name becomes application.clients[0].name for the first collection item.
Do I need business rules for both saving scenarios?
Individual Save (Scenario 1): Yes, you need a business rule to update the original array
Bulk Save (Scenario 2): No, the entire array is saved directly without additional business rules
Use Individual Save for real-time editing where users work on one item at a time. Use Bulk Save for form-completion workflows where all data is submitted together.
Key Management
Use descriptive, relative keys in your form fields. Let the system handle path construction automatically for better maintainability.
Validation Strategy
Plan your validation approach early. Individual saves validate per item, bulk saves validate everything - choose based on your user experience goals.
Data Structure
Design your array structure to include all necessary fields from the start. Adding fields later may require updates to existing prototypes.
This feature significantly simplifies building dynamic forms with repeatable sections, eliminating the need for custom development while providing flexible validation and saving options.
Add a Send Data to User Interface action to push the modified array back:
{ "application": ${application}}
Always send the updated array back to the frontend after deletion. Without this step, the UI will still display the deleted item until the next page refresh.
Place the “Add” button outside the collection, and attach a UI action (type ACTION) pointing to this business rule. Then send the data back to the UI with a Send Data to User Interface action.
Collections do not have built-in filtering. To filter displayed items based on form selections, use the same pattern as Table cross-component filtering:
Keep the original data in one key (e.g., application.clients)
Store the displayed data in a separate key (e.g., displayed.clients)
Point the Collection’s Source to the displayed key
On each filter dropdown’s CHANGE event, trigger a business rule that filters the original data and writes the result to the displayed key
For simple client-side transformations (no server roundtrip needed), you can also use UI events with an onChange expression instead of a business rule.