Discussions

Expand all | Collapse all

Assign Parent ID

  • 1.  Assign Parent ID

    Posted 19 days ago
    I have been researching API calls and url creation to aid in updating child records but am working myself in circles I believe.  I am a newer QuickBase user but hopefully learning fast.  : )

    In my App I have two Tables: Time Entries and Batches.  Time Entries is a related table to Batches, with Batches being the Parent and Time Entries being the Child.  I am seeking a way, via url or form button, that when selected from the form view of a specific Batch that Batch ID (Record ID key field) is captured and copied but ONLY to specific records in Time Entries.

    Batches can have multiple Time Entries but Time Entries should/and will only ever be linked to a single Batch.

    Time Entries is a set of data imported from another system but once imported may, or may not, be assigned to a Batch.  Only Time Entries that don't have a Batch ID AND have an "Excluded" field value = No AND have "Billing Type" field value = Bill should be updated.

    So the process would be as follows:

    New Time Entries are imported from outside source and reviewed to have the "Excluded" field checked Yes or No (Billing Type is one of the imported values).

    A new Batch record is created (with various data points) and a url/button is clicked which would copy the Batch ID and paste it to the Related Batch ID in Time Entries where Related Batch ID is Blank AND "Excluded" value = No AND "Billing Type" = Bill.  It would also be nice if the action could also clear any "checked" (yes) values in ANY record in Time Entries.

    I do hope this makes sense and if something like this is possible.  My research has return results for automations regarding copying Parent or Parent/Child records, but in this case I am not trying to create new records simply update existing child records so they can relate to a Parent one.

    Thank you for any assistance you might provide.

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


  • 2.  RE: Assign Parent ID

    Posted 19 days ago
    I believe I have answered my own question.  : )

    I created a pipeline which was triggered on the creation of a new Batch.  The pipeline is set to capture the Batch ID, search for the appropriate Time Entry records, then copy Batch ID to Related Batch in Time Entries. 

    A second pipeline was created which is triggered when Related Batch field is updated.  This pipeline is set to search for any Time Entries with "Excluded" = Yes and changes to No.

    I will want to run many more tests, but I believe these 2 pipelines have achieved the needed results.  YAY!

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