 Let's understand one more screen flow scenario. In this scenario, we need to create an opportunity records related to account and the value of n will be provided by the end user. So this scenario basically helps you to understand how to implement loop through decision element when collection variable is missing. So generally, if you implement a loop in screen flow, so we require collection variable. But if collection variable is not there, still you can manage a loop with the help of decision element. So now I'm going to demo this. So I'm going to create new flow selecting a screen flow. So first of all, I'm going to create a screen, labeling it as get quantity. Now here, I'm just picking a number component. So here labeling it as how many opportunities you want to create, right? So this way, this label will be available. If you want different label, you can change as per requirement. Then I'm making it as it has required. Right. Now, I'm going to create new resource as a variable naming it as counter data type will be number and its default value I'm considering as one and decimal places are zero. So initially, this variable this counter variable will be having value as one. So basically what I will be doing, I will be testing this counter variable with this entered value. If counter is less than this value, it means we need to iterate a loop. Right. So instead of implementing it through auto layout, I am. Okay. So let's first implement auto layout, then I will be converted into free form. Okay. So what I'm going to do, I'm having a decision. So naming it as check counter. So labeling it as require more records. So if counter is less than or equal, how many opportunities you want to create. This is a variable which will which will be having users input if counter is less than or equal to this, it means this condition will be true and we need to iterate. So I clicked on done. Right. So here I'm going to create a screen. So opportunity information and here I need to create the components of first time creating text, name, require. Then I need to create a date. So date will be closed date. Require. And then I need to have a pick list. So these three fields are required while you, if you want to create any opportunity, like name closed it and stage. And in this, I just need to create a pick list choice set. So it's API name I'm taking as stays name. It is opportunity data I pick list and stays name. And done. And done. So this way one opportunity will be created. So actually if this condition is true like require more records. So this is the opportunity information we need to provide now after receiving this opportunity information, we need to store this information into a record. Right. That will be opportunity record, and that opportunity record we need to add into a list because in Salesforce, you cannot perform DML operations inside loop, like if I directly use create record here. So this create record element here. So it will be part of a loop. So we have a governor limit so we can just have 150 DML statements in a single transaction. So let's suppose user entered 200. So and if I use this create record inside the loop so your flow will break because the limit is 150. So the solution for this is read information opportunity information from user store them into a record, and then add that record into a list. So now I'm going to create two variables. So first one is opportunity record. So this data type is record and object is opportunity, then I'm clicking on done so this will be storing one opportunity information. Again clicking and variable then opportunity list. So I need to select record object opportunity, and this time I need to select this checkbox that is allow multiple values. Now I'm clicking on done so this way I created two variables you can see them here. So record single variable OPP record and record collection variable that is OPP list. Now, clicking on this plus and using assignment. Opportunity information to record. So now OPP record dot name equals the name which we received from the screen, then OPP record dot close date equals to close date. And opportunity record stage equals stays right so this way these information mapping. Okay, so one thing we need to do here like we need to create one more variable as a record ID, because we need to relate all these opportunities with single account wherever we are like from wherever we are launching this flow. So we need to create this record ID variable. We created this before in other scenarios as well so available for input and done. So here what you need to do. Just open it again and opportunity record dot account ID equals and then select record ID. So this way you assigned all the opportunity related information that you received from this screen to the record. Now you need to add this record into the list. So add opportunity record to list. So we have opportunity list then select add and then opportunity record. And you need to increase the counter by one. So you can just add one here. And done. Right now, we need to transfer this control at top so basically now, if you're implementing your flow through this decision element decision element and you are implementing a loop through decision element so now it is difficult to go to this decision again so I'm just converting it into this freeform layout. So what is happening like we have we have the screen then we have this decision, then we have one more screen, then we have this assignment, and the we have one more assignment. So this way you can see how these are placed. Now what I need to do. I need to link it here. So this is difficult in auto layout like if you implement a loop through decision element. So it is difficult to like create this kind of flow. So flow lines you can't connect as per your wish so you can anytime convert your auto layout into freeform and then you can manage it. Now after this like you can see all the elements are available here so we need to select create record. Now, this time I will be selecting multiple because I need to create multiple opportunity records, and I'm selecting opportunity list as an argument, because it is a record collection, and clicking on done. Connecting it here. Right, I'm clicking on save. Right, and clicking on done. Activate moving to account record page. Clicking on edit page. So from here I'm just removing these existing flows so that we will be having only one flow. So I'm just dragging and dropping flow component and I'm going to select create an opportunity related to account, right, and I'm enabling this checkbox clicking on save moving back. So now I'm going to select a record where opportunity reports are not available so I'm just opening this you can see there is no opportunity reports, and here is the flow. So this flow will be available on each account record page. So it is asking how many opportunities you want to create. So let's say I provided for I want to create four opportunities so I clicked on next. So OPP 201 then let's say close date and prospecting so clicking on next, then OPP 202, then next, then OPP 203, next, then OPP 204, and next. So this time it won't ask any other opportunity information and related to this account you can see four opportunities are created. So this way I hope you understood if we don't have any collection variable. Still, we can implement a loop with the help of this is an element.