Skip to main content
Solved

Bulk create child records from selection list

  • January 11, 2024
  • 0 replies
  • 525 views

EmberKrumwied
Forum|alt.badge.img+13

Looking for a way to help users customize child related tasks when creating a new parent record.

Nothing has been built quite yet but the basic structure would be to have a parent table Transactions which relates to a child table Tasks.  Each Transaction could have a dozen or more Tasks.  To aid the user in not having to create each Task for each new Transaction, I was thinking I could present to the user a "list" of available Tasks that they could select.  Then when the parent record was saved, each of the selected Tasks would be created as new records in the related child table (linked, of course, to the new created parent record).

I'm thinking, to start, I will need some kind of field on the parent record which would display the list of available Tasks.  I would envision that this field would only be visible when the record is being created and hidden all other times.

Once the Tasks have been selected I would need some way of translating each selection into its own child record which relates to the parent record.

Does this sound possible?  Is there a different/better way to approach this?



------------------------------
Ember
------------------------------

Best answer by EmberKrumwied

Just to close this loop. I did go with the copy master and detail option.  For this instance I modified it so that just the child records would be created as opposed to both the parent and child records.  This setup should meet our needs as the need for the 30+ child records isn't a given when a new parent record is created.  This keeps my app free of extraneous records that may never get populated.  The user will be able to select child records that aren't applicable but still allow for additional ones as needed. 

As a bonus, I configured the parent record to hide the "copy child records" button if any child records are already created. But, if for whatever reason, they delete all the child records, they will see the button again to re-add.

Happy with the solution.

MarkShnierYou
Forum|alt.badge.img+24

Just a thought. Would it be a better user experience to Auto create all the children then the user can immediately go in and just delete the ones they don't want?  



------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------

Forum|alt.badge.img+9
  • Registered
  • January 11, 2024

Lets answer your first question: 

Yes - you could have a multi select that allows you to create children records. This method though would entail using either webhooks or Pipeline to convert that multi select value into an import format that either the webhook or pipeline would import into your tasks table. If that's your desired route I can provide more detail.

The other options I would suggest are: 

  1. Create Task templates an have your users pick which templates they want. This entails a table for templates and template tasks - and your users pick from a dropdown of templates which they want to use. Then a pipeline can copy the tasks for that template over to your transaction in bulk.
  2. Have a list of tasks for your transaction and create ALL of them for each new transaction. You would have a pipeline just bulk import the same set of tasks every time a new transaction is created. Then - your users can view the tasks that were created and check a box to 'remove' that task. This is the same as your idea in reverse where you start with all of them but then remove what you don't want.



------------------------------
Chayce Duncan
------------------------------

EmberKrumwied
Forum|alt.badge.img+13
  • Author
  • Registered
  • Answer
  • April 16, 2024

Just to close this loop. I did go with the copy master and detail option.  For this instance I modified it so that just the child records would be created as opposed to both the parent and child records.  This setup should meet our needs as the need for the 30+ child records isn't a given when a new parent record is created.  This keeps my app free of extraneous records that may never get populated.  The user will be able to select child records that aren't applicable but still allow for additional ones as needed. 

As a bonus, I configured the parent record to hide the "copy child records" button if any child records are already created. But, if for whatever reason, they delete all the child records, they will see the button again to re-add.

Happy with the solution.