In this Salesforce tutorial, we will learn about the Repeater Component in Salesforce screen flow.
In the Salesforce Spring ’24 release, a new Repeater component was launched specifically for the screen element. This component is helpful in creating multiple records in a single-screen flow interview.
Salesforce Repeater Component
In Salesforce flows, the Repeater component collects information about multiple records of the same type on a screen flow. It allows the repetition of a set of fields in a single-screen element.
This component simplifies creating multiple records in a single screen flow operation. For example, you create Contact records using screen flow. For that, you input data in the fields displayed on the screen flow, and to add another contact record, you need to run the flow again.
Using the Repeater component, the set of fields can be added multiple times. After entering the fields, when we run the flow, it will create multiple records.
Use the Repeater Component in Salesforce Screenflow
Now, using an example, we will create a Screen flow using the repeater element, and with this screen flow, we will create Opportunity records.
To create the screen flow, navigate to Salesforce’s setup page and follow the steps below.
1. On the setup page, search for and then select flows in the quick find box to navigate to flows setup.

2. In the flow setup, click on the New Flow button.
3. Select the option Start the flow from scratch and click Next. In the next window, select the option Screen flow and click the Create button.

4. To get Opportunity details from the user, add a Screen element to the flow.

5. Enter the Label for the screen element, then add the Repeater component to the screen and enter the API Name for the repeater element.

6. Within the Repeater component, add the Text component to input the Opportunity Name, then add the Date component to the Close date field.
You can add the Picklist component for the Opportunity stage field.
The repeater component will only repeat the fields that are inside it.

8. The repeater component will give output as a collection of Opportunity field values that it contains. We need to add a Loop element to loop through the output and then use an Assignment element to assign the values to an Opportunity record variable.
Add a Loop element to the flow and select Collection Variable as Screen details ( screen name) > Repater (repeater API Name) > All Items.
Then, in the Direction, select First Item to Last Item.

9. Now, create two New Resources for the Single and Collection record variables, that we will use in the Assignment element.
- For the single record variable, enter the API Name. Select the Data type as Record and Object as Opportunity, then click Done.

- For the Collection record variable, enter the API Name. Activate the checkbox Allow Multiple values.
Select the Data type as Record and Object as Opportunity, then click Done.

10. Add an Assignment element inside the loop. Enter the Label and API Name for the element then map the variables and values in the following way.
Here, Opportunity_recordvar is a single variable, and Opportunity_collectionvar is a Collection variable.
| Variable | Operator | Value |
| Opportunity_recordvar > Name | equals | Opportunity_Name (text) |
| Opportunity_recordvar > Close date | equals | Close_date (date) |
| Opportunity_recordvar > Stage | equals | Opportunity_stage (picklist) |
| Opportunity_collectionvar | add | Opportunity_recordvar |

11. Add a Create Record element outside the loop. Enter the label and API Name for the element.
In the section How many records to create, select the option Multiple. In the field Record Collection, select the collection variable we created in the above steps.

12. Click on the Save button in the flow builder. Enter the Flow Label and Flow API label in the next window, then click Save.
The Screen flow is created with the Repeater component on the screen. In the next steps, we will test and debug the flow.
Test and Debug the Screen flow
To test and debug the flow, follow the steps below; before that, make sure that you have saved your flow.
1. Click on the Debug button in the Flow Builder.

2. In the debug window, click on the Run button.
3. Enter the details of the fields in the screen flow, and to add another record, click on the Add button.
As we click the Add button, the repeater component will display another set of fields to create a record.
After entering the record fields, click on the Next or Finish button to complete the flow button.

4. Navigate to the object tab for which you created the records through screen flow. The records will be visible in the list view, as shown in the image below.

The records are created, which means the Screen flow ran successfully. After this, you can Activate the Screen flow to deploy it on the Records pages.
This way, we add and use the Repeater component in Salesforce screen flows by following the above steps.
Conclusion
In Salesforce screen flows, using the repeater component allows the creation of multiple records through a single screen flow.
You might have understood how we can add and use the Repeater component in the Salesforce screen flow by following the steps.
You may also like to read:
- Lightning Table Dashboard Component in Salesforce
- How to Use Record Choice Set in Salesforce Screen Flow
- How to create a Salesforce Screen flow
- Get Current Record ID in Salesforce Flows
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.