There was a trick using the countdown addon that allowed you to delete multiple (nested) records from a collection.
Is there some way to do the same in creating multiple records within a single collection where only one data point changes?
I want to allow my users to create new records within a collection, allowing them to male a selection using a multi-select dropdown. Then, once they click the create button, it creates as many records as they have selected from the dropdown.
Scenario:
You have a state with a multi-dropdown of several cities. There is a text box where a user can type in a toy store. After the user enters the toy store name, then they select the cities that the toy store is located….let’s say there are 3 selections.
When the user clicks the create button, the app then creates 3 new records within the state for each city that has that toy store.
Is there a way to do this without some 3rd party pay addon like MAKE?
Just in case: when you use countdown, you need something to create multiple records from. In your case the possible approach could be adding these cities to a M2M relationships to a Logged-in User, and upon clicking the button direct a user to another screen with a list of cities, filtered by this relationship, with a countdown creating the actual record and removing the relationship.
Using the method that you describe in your video, would this work:
Creating the 1st record of the group with the Toy Store….then using the clone button and multi-select dropdown with the list of other cities that have the toy store, then during the cloning process, cycle through the selected cities and write a new (cloned) record with the name of the city replaced as throughout the number of cities selected?
@ThunderBlade based on my experience, daisy-chaining record creation with countdown is tricky and unstable.
I’d create a “template” records or relationships, and then use countdown.
BTW, I am not sure why countdown is needed at all. If you use a regular list instead of multiselect, why not have a list of cities and create list items inside it (using checkbox and nested list)?
This would mean that my user would have to repeat the same function the number of times that they would need to satisfy their selections. Imagine having to do this 20 times. With the multi-Select Dropdown, they could select the number of times needed based on their picks from the dropdown, then the app would take care of the repeating process (adding the selected items from the dropdown into each clone).
Also, this is my very first app….so I may not understand what you are trying to tell me.
What if I had 15 points of data that needed to be cloned across 12 different new records. 14 of the 15 points of data shall be the exact same, but only 1 needs to change based on the selections made by the user (via the mutiselect). This is my goal
@ThunderBlade your user will have to click on the city selection 20 times anyway, be it a multiselect dropdown or a list, which creates city records. Who stops you from creating a city record with all these 14 defaults in this case?
Just in case, I am talking about the list of Cities, where you can create store records by clicking on an icon, and this icon is replaced by a single-item list representing current store. And you can delete this record (and original icon appears).
Multiselect dropdown will work a bit faster during the selection process, but it has other glitches, mostly visual.
Anyway you can use both approaches as you wish - you can use countdown as well.
I have found a work around, but need a little help.
I’ve created a screen with some text input fields.
Text Input 1 = Store Name
Text Input 2 = Store Product
I then created a card list style list of my cities. Within that list I made an action to create a record of the city that i tap on the list. This part works and the user can fly through the record creation process this way.
The problem is that once the user taps on the list to create the first record for the city that was tapped….the text input field empty so that the next record is created without the data from the text input fields.
I attempted to make a secondary text input field (3) and placed an action on the list to change the input field value of text input 3 to that of text input field 1 (Store Name). This worked.
Then i placed an action to essentially copy the text from Input Field 3 back to Input Field 1 after the record is created.
The data does not copy over and the Text Input Field 1 remains blank.
The help I think I need at this point is to tell me how to keep the data in Text Input Field 1 (Store Name) from disappearing once the 1st record has been created.
@ThunderBlade it seems you’re trying to create something that won’t work.
Here is the example how you can use multiselect dropdown + countdown timer, as I’ve replied before: https://youtu.be/7Md1UjenDwk
The parts that I was missing were how the M2M could be used as well as how the Logged In User (or User Collection) could be used to store data temporarily. I will toy around with this a bit and reply here as to my success or failure.
@Victor I had a few difficulties getting things working, but after plowing through I was successful in getting all of my data points to duplicate across the selected records. For the cities, I used the M2M relationship populated to the Logged In User Collection via the MultiSelect Dropdown, but all of the other data points….including other relationships….it was much simpler to carry those points over from the previous screen selections….minimizing the need to remove all of those data points from Logged In User.