I am hoping to find if I can iterate the process of auto-creating unique collection names (for instance -Collect1,Collect2,Collect3...) based on the number of times a button is clicked in PowerApps. To elaborate in detail, I will explain the working of the app through screenshots from my current app (shown below) to demonstrate what happens in every screen and ultimately showing where I am struggling with.
Working of the app:
Plan Customisation - Under the 'Plans' Tab, a Mobile Plan is selected from a Gallery and a'Handset' is selected from the 'dropdown box'. The selected items are added to two different collections namely
Following a similar process, other selected items ( Accessory Repayment Option $360, Valued Customer Bonus) are added to two different collections namely
All of the selected four collections along with the total cost of the selected items are displayed in a Gallery as shown below in the 'Plan Summary Screen'
What I am hoping to achieve is to add a button called 'Add More Products' and when the user clicks this button, the whole process mentioned above (Plan Customisation - CollectPlan, CollectHandset, CollectAddOns, CollectDiscounts) should begin again. What I am struggling is with how to go about coding PowerApps to collect a different set of collections (i.e. CollectPlan2, CollectHandset2, CollectAddOns2, CollectDiscounts2) when the user hits the 'Add More Products' button. The third time when the user hits the 'Add More Products' button, a third set of collections should be created(CollectPlan3,CollectHandset3,CollectAddOns3, CollectDiscounts3) and the whole processs should repeat and so on. The end result should be along the lines of how it appears below.
(I have just copied the same information twice for illustrative purposes)
I am a beginner in PowerApps so any directions to achieve the same would be of immense help as I have been struggling to find a solution for the same.
I like the design of your app
You can not auto-create unique collection names (for instance -Collect1,Collect2,Collect3...) based on the number of times a button is clicked in PowerApps.
What you can do is add records in a collection that every record may have a field that identifies the specific record.
So instead of creating collections (-Collect1,Collect2,Collect3...) you can add records to a collection and each record can have a different ID. ID is a column name.
So the moment you want to display certain records you can you Filter(CollectionName,ID=1) for example.
The above may seem too easy or too difficult to implement. What I am trying to say is that instead of creating collections with different names as you said, you can create records in a collection that each record (or set of records) has something unique to distinguish it from the other records (or set of records)