Forum Discussion

KimG's avatar
KimG
Qrew Cadet
3 years ago

How to make my automation repeat X times

Hi 

I have a button that adds a child record to a table with various data from the related table. 

It's involves three tables: a Company, Quote and Asset.  When products quoted turn into a sale, the user clicks the button to create an Asset record on the related Company record with info pulling from the quote regarding the type of equipment purchased, sales order number, etc.  Clicking a button causes a checkbox to be checked.  The automation runs based on that checkbox being modified to checked; the last step of the automation is to uncheck the box.  This works just fine.  Since it's capital equipment most often sales are 1-2 items, meaning the button may need to be clicked once or twice to record the assets.

Sometimes ​we get bigger orders at which point it becomes annoying to click the button 10-20 times.  Also if the user isn't patient between clicks giving the system time to run the automation, it may not register all the assets.

I'd like to add a field for adding multiples, but am not sure on the right syntax for getting my automation to loop for x times.   I know it probably involves snapshots, and a formula to subtract one for each loop, but could use some help on setting up this structure.

Yes, I've set this up in Automations rather than Pipelines since it's far more easier to figure out how to do.  I've attended several Pipelines training, but it all hasn't soaked in very well.

Thanks for the tips!

Kim

------------------------------
Kim G
------------------------------

4 Replies

  • ... So does one Order have many Quote lines and the current process is  to "push" the button on each quote line.  ... and the desired button would be on the order?

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • KimG's avatar
      KimG
      Qrew Cadet
      No, it doesn't work quite like that.  I guess I do need to mention a 4th table related to Product - that is Model.  So when someone creates a quote, there's a multi-select field where they can pick Product names.  Based on this, further fields will appear to select from the models available, and other options related to each product.  (When equipment is first quoted they may not know which model; this info doesn't have to be selected initially but must be filled in prior to the quote closing as won at which time the magic button is clicked and the asset created.)  So it's perhaps more clunky than relating a list of products to the quote.

      There are actually multiple buttons depending on what is quoted because I couldn't figure out an easy way to account for all the items in one button.  So if on the quote Product A and Product B are listed, then they would see two buttons, "Add Asset Product A" and "Add Asset Product B".  Each product has its own checkbox and own automation.  The "Add Asset Product A" runs an automation for that asset, and so forth.  So if someone is buying Product A and B then you would need to click two buttons.  If someone is buying 2 of only Product A, then you would need to click the "Add product A" button twice.  It's this case that is the issue.  We have some customers by 30+ of Product A.  I would expect to add a "Quantity of Product A" field to the form that would get used in the automation. 

      Kim Gardner | Marketing & Communications Coordinator | Comco Inc.

      Direct: 1-818-333-8514 | Main: 1-818-841-5500

      2151 North Lincoln Street | Burbank, CA 91504

      We make your life a blast!



      • JeremyMyer's avatar
        JeremyMyer
        Qrew Trainee
        I have a similar use case where for any given Test, I need to add Sample Parts.  I have an automation that loops as Kim mentions with a 'counter' & 'next counter' field to achieve the X new Sample Part records.  I have it working, however the processing time for adding new records 1x1 is quite slow, and takes several screen refreshes to get all the records to show.  

        I've been working with QB to get a better solution, namely a bulk record upsert to created all the records in the background, then immediately show all X records at once.  I was pointed toward this app, but haven't had a chance to play with it and get the logic working in my app.  It's in the app exchange - "Create X Children"
        https://nsk.quickbase.com/db/main?a=AppDetail&ID=4093&app_name=Pipelines%20-%20Create%20X%20Children

        Just thought I'd post this in case you find it helpful.

        ------------------------------
        Jeremy Myer
        ------------------------------