Discussions

 View Only
  • 1.  Creating multiple child records based on a # field in the parent

    Posted 06-25-2020 13:23
    Hello Community! 

    Okay so I am looking to set up a system where once a new record gets created in a parent table that includes a numeric field in the record, it will create "X" number of child records equal to the value listed in the numeric field ID.  Is this possible?

    I am sorry if my description makes no sense.  An example is below.

    Contract Record is Created (Parent Table) with a field in the form that is titled "# of related contract amendments" and say that field is equal to 6.  We would want 6 records created in a child table related back to the parent. 

    What is the best way to do this?  Pipeline?  Automation?  I am just not sure how to get the # of related records created to equal exactly what the user inputs into the numeric field within the parent record.

    Any help is appreciated!​

    ------------------------------
    Joshua Case
    ------------------------------


  • 2.  RE: Creating multiple child records based on a # field in the parent

    Posted 06-25-2020 14:35
    There are multiple solutions.  What is the most # of records you would possibly need to create as that would affect my suggested solution..

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Creating multiple child records based on a # field in the parent

    Posted 06-25-2020 14:40
    Let's say at worst 29.

    ------------------------------
    Joshua Case
    ------------------------------



  • 4.  RE: Creating multiple child records based on a # field in the parent

    Posted 06-25-2020 14:46
    The low tech solution would be to have an Automation to create 30 or if you like 49 children.  Each Action in the Automation will populate a field with the child number, from 1 to 30.  You can copy Actions, so it's not too painful to set up.

    Then lookup the # children required from, the parent to the children, and add a last step to delete children when their counter # is greater than the # of children required.

    There are fancier methods which are a bit harder to setup which would have a better user experience as the children would get created quicker, but this low tech method could be good enough.  ​​​

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Creating multiple child records based on a # field in the parent

    Posted 06-25-2020 15:29
    Any way to describe the fancier method?  The example you provided is good and can be done quickly but I need to create the most streamlined experience for the end-users that's most effective and delivers the exact number of child records based on the parent's data.  I like a challenge and I don't mind a difficult setup.

    ------------------------------
    Joshua Case
    ------------------------------



  • 6.  RE: Creating multiple child records based on a # field in the parent

    Posted 06-25-2020 18:35
    OK, sure.
    Make a helper table called Automation Focus.  Add 1 record.
    Make a field called [Record ID# of Focus Parent]. Make a field called [# of children required].

    Make a new table called with say 100 records called Children Source in it and number them from 1 to 100.  You can use the Record ID# for this purpose as long as you create the records and then stop anyone from deleting records, even the Admin.  You can import from excel to create the records and populate a dummy fields to be deleted.

    Make a relationship between Automation Focus and the  Children Source to lookup the  

    Make a lookup from the Automation Focus for [Record ID# of Focus Parent] and [# of children required]. 

    Make a saved table to table import to map from Children Source to the child table but limit where sequence # is less than or equal to the # children required.

    Lastly make a formula URL button to do three steps.

    Populate Automation focus 
    Run the Import
    Redisplay the record.

    If you want the records to automatically populate the children whe  the parent is created, then this can be done in an Automation.
    ie populate the Automaton focus 
    Run the import.
    ​​​

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 7.  RE: Creating multiple child records based on a # field in the parent

    Posted 10-13-2021 11:33
    Does anyone know how to do this in an easy way with pipelines?
    Thank you!

    ------------------------------
    Miriam Klugman
    ------------------------------