Discussions

 View Only
Expand all | Collapse all

Automation of iterations - Thoughts?

  • 1.  Automation of iterations - Thoughts?

    Posted 05-14-2020 00:39
    I am trying to devise a way to have an automation copy the contents of a record a number of times specified by the user. Kind of thinking through this as I type it here.

    It is to be used for when the same task and associated details, has to be done X number of times. Rather than inputting the same task X number of times, which is a lot of busy work, I was hoping that the user could input the task once and indicate if the task needed to be copied and how many times.

    I was thinking that the automation could be based off the create/modify record, and the trigger could be if there is a yes & if the # of times is >0.
    It would create a new record, copying the original record details, and then it would subtract 1 from the # of times.
    Due to the Yes still being active, and the record being modified (the # of times being less), it would trigger again.
    This would continue until the # of times reaches 0 (zero), at which point the action would change the Yes to a No.

    It kind of works in my head but I have not yet tried it in the application.

    What kind of issues do you foresee getting in my way? Any suggestions or better ideas on how I might go about accomplishing the required results?

    I am going to give the above a try and see if I have any success.


    ​​​​​

    ------------------------------
    Andrew
    andrew.fry25@gmail.com
    ------------------------------


  • 2.  RE: Automation of iterations - Thoughts?

    Posted 05-14-2020 07:52
    I have done looping Automations, but here is another easier suggestion.

    Make an Automation that is triggered by a checkbox being toggled.

    The Automation will have 21 steps.  Steps are easily copied.
    Steps 1-20 will create 20 children numbered 1 to 20 as child records of a parent.
    The 21st step will delete any children who have numbers higher than the # of Tasks required. 

    If you need 5 Tasks, then it will create 20 (always) and then delete 15.

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



  • 3.  RE: Automation of iterations - Thoughts?

    Posted 05-14-2020 12:20
    Mark,

    That is an interesting way to have it do it. Basically you just mass produce in bulk, then remove the copies you don't need. The removal is going to be the difference between the # mass produced (in your example it was 20) and the number desired.

    I will have to give that a try. Thanks Mark!​

    ------------------------------
    Andrew
    andrew.fry25@gmail.com
    ------------------------------



  • 4.  RE: Automation of iterations - Thoughts?

    Posted 05-14-2020 12:31

    The delete would be on any value 1-20 written onto the child which is higher than the lookup of the number required. 


    The number required will be looked up down to children. 



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



  • 5.  RE: Automation of iterations - Thoughts?

    Posted 05-14-2020 18:56
    So I have decided to try the looping method for the time being. But I think I hit a snag.
    Basically I create the Parent record and at the same time I create a child record.

    I then need to copy the Parent/child pair, X number of times the user needs.

    Copying the Parent record has proven to not be too difficult. The issue I am facing is properly copying the original child record, and associating it to the copied parent record. I won't know what the copied parent record ID # will be ahead of time so ......

    I wonder if I need to run a separate automation for the child records, and have some sort of trigger field in the copied parent record to do it ..... ????

    Also, Mark, would you method of mass producing records work with copying child records too? I kind of steered away from doing the mass record creation because I have some automation in place to generate notes when various records are created. I would hate to have 20+ notes for deleted records that were not actually needed.​

    ------------------------------
    Andrew
    andrew.fry25@gmail.com
    ------------------------------



  • 6.  RE: Automation of iterations - Thoughts?

    Posted 05-14-2020 19:52
    I had assumed incorrectly that you wanted to create X number of child records for a parent.  But now i see that you want to duplicate the parents and now want to add a wrinkle that these copied parents need to be born with children too.

    Are the children to be created always the same, or do they need to take their values for some data from the original Parent's children.

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



  • 7.  RE: Automation of iterations - Thoughts?

    Posted 05-14-2020 20:04
    The copied children need to mirror the original child.

    I have set up templates for both the Parent and Child records before, but those are consistent across the board.
    I would imagine this is something similar, but there is the facet of the child data being different each time.

    Hopefully that makes sense.

    ------------------------------
    Andrew
    andrew.fry25@gmail.com
    ------------------------------



  • 8.  RE: Automation of iterations - Thoughts?

    Posted 05-14-2020 21:39
    I would have an Automation Focus table with just 1 record.  It will be Record ID# =1.  I would have a URL formula button on the Parent update that record with the [Record ID#] of the Parent and maybe a date time or toggle field to start an Automation.

    One thing that I recently noticed which might be new or might just be something I never noticed, is that when you have an automation step that creates a record, then in a subsequent Step in that Automation you can access the Record ID# for the Add record in a previous step. So the Automation can a create child and attach it to the new Parent.  

    As for knowing what to write for the Child's fields, you should be able to do an Automation COPY step where the related Parent = the Automation Focus original Parent Record ID# but then  like I said above, the [Related Parent] can come form the Automation now letting you select the Record ID from a previous Add Record step.  I have never used that mysef, but I noticed it today)

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



  • 9.  RE: Automation of iterations - Thoughts?

    Posted 05-14-2020 21:51
    Thanks for the ideas Mark.

    Yeah, I just noticed two days ago that if I add a second step to an automation, and the prior step is a create record, then that new record is available for the 2nd step. I bet I could hook this into create the child record.

    As far as the fields that need to be populated, I can try and figure that out.

    Take care!

    ------------------------------
    Andrew
    andrew.fry25@gmail.com
    ------------------------------



  • 10.  RE: Automation of iterations - Thoughts?

    Posted 05-15-2020 08:02
    Just to close the loop on that "new" feature of automations. I checked with Support and apparently it has been there all along.   Well, ...  live and learn.

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