Updating a child record when the parent record is modified with pipelines

Prev Next

Have you been looking for a way to update manual entry fields on your child records when important changes happen on your parent records? For example, imagine a company tracks hundreds of projects, each project having hundreds of tasks. They want to track each task individually until a project is completed, then they need all the tasks to be set to complete. Doing this manually would be time-consuming and tedious work. Instead, using Pipelines they can make sure that their completed project automatically triggers a pipeline set up to mark all their outstanding tasks as completed to get rid of unnecessary cleanup.

Overview

Assume the following table structure: 

Projects -> Tasks 

Scenario: If a Project's status is set to completed, all status for each related task status should also be set to completed. 

Overview of example pipeline 

  • Step A: Trigger the pipeline when a record on the Project table is modified and the project's status is set to complete 

  • Step B: Search the Tasks table for all child records related to the modified Project from Step A 

  • Then, for each child task:

    • Step C: Update the task. 

 Guided Instructions

Pipeline step A: Trigger when project is updated 

Step A triggers the pipeline whenever a Project is updated AND a specific condition is met 

  • Condition: Status is equal to Completed 

Pipeline step A configuration showing the Record Updated trigger for the Projects table with a Status equals Completed condition

Setup

  1. Create a new pipeline and give it a descriptive name 

  2. Open the Quickbase channel, then open the Records category 

  3. Drag the Record Updated trigger onto the canvas 

  4. In Account, select your user token or enter a new one (learn how to use the Quickbase channel). 

  5. For this example, select the Projects table, which is the parent record in the example 

  6. Set Trigger on Any Field to No 

  7. In Trigger on Any of These Fields, select Status 
    Note: Steps 6 & 7 ensures this Pipeline only triggers when necessary. These steps should be taken whenever possible in Pipeline creation for step-run efficiency 

  8. In Specify Fields for Use in Subsequent Steps, select Status. This allows the Status field to be used in the query, which you'll define next, and allows the field to be used later in the pipeline 
    Note: If you are using a custom key field, you'll need to define that here 

  9. Select Add Conditions to define a query. In the Query section define the Status the project must have for this pipeline to trigger. For this use-case, only trigger the pipeline when the Project is Completed 
    Note: Not defining a query would cause the pipeline to trigger whenever the status field changed, regardless of what it was set to. 

Step B identifies the child tasks that are related to the parent Project defined in Step A. To do this, search the Tasks table for the related tasks. 

Pipeline step B configuration showing the Search Records step for the Tasks table with a Related Project equals condition

Setup: 

  1. Drag the Search Records step onto the canvas as Step B 

  2. In Account, select your user token 

  3. Select the Tasks table 

  4. Under Fields, select Related Project and Status 
    Note: This allows you to use the Related Project field in your query and to leverage the Status field's value later in the pipeline 

  5. Select Add conditions 

  6. In the Query section, select Related Project  

  7. Select Is 

  8. Drag the Record ID field from Step A in the box so the condition reads: Related Project is {{a.id}}
    Note: This is a critical step in the configuration of the pipeline. This ensures only the children tasks of the related parent Project are being updated in the next step. If you're using a custom key field, be sure to select the child table's reference field in the query, and drag the custom key field into the query 

Step C updates each child task record found in Step B to Completed. 

 Setup

  1. Drag Update Record action into the Do branch as Step C. The record from the search step is selected automatically.  

  2. Select Add Fields, and select Status 

  3. Set the value of the Status field to Completed 

With this setup you can make sure tasks aren't left unfinished triggering notifications and reminders or leaving confusion about finished projects for your employees.