Forum Discussion

PeteMaravich's avatar
PeteMaravich
Qrew Member
10 months ago

Creating Multiple Records using a Pipeline

Hi, I would like to create an 'n' number of records in a Poles table, when an 'n' number is added to a field in the Projects table.  I'm pretty sure a pipeline is the way to go.  I've created one that works with 1 new record, but how do I loop if it's more than one.



------------------------------
Mike
------------------------------

1 Reply

  • I'm sure there are several ways to do this but here is the way I do it.  I create a helper table with one Record ID in it and I use it to record the number of records to be created and the Record ID# of the Parent table.  

    I then have another helper table with say 1000 records in it.

    I relate those two tables based on the formula reference field of a 1.  I look up the number of records to be created down to my thousand record helper table along with the [Record ID# of the parent table.  I put a flag on that field if that record is OK to copy to my target Child table based on is the [Record ID#] is less than or equal to the # of children required.

    I then set up a saved table to table copy to copy across Hertz from the thousand record helper table which qualify, to the child table.  

    And then I said a pipeline to trigger and set the values in that single record table for the number of records to be created and the record ID of the parent  

    I then have a ste to call a Quickbase API to run the saved T2T import with a simple URL

    https://myucompany.quickbase.com/db/xxxxxxx?a=API_RunImport&id=10
    Method = POST

    nothing else is required

    https://yqc.quickbase.com/db/bnr6pavr3?a=API_RunImport&id=11
    Method = POST

    nothing else is required

      



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