When building a pipeline that uses any trigger in the Quickbase channel, builders can define the number of records that must be added, modified, or deleted to cause the pipeline to trigger. To do so, use the Trigger on number of records changed setting when configuring the step.
This is useful when you have pipelines that use both single-event and bulk-event triggers in the same Quickbase table. Configure when each pipeline should trigger to prevent them from running simultaneously. For example, you may set the single trigger to run on a maximum of 9 record changes, and the bulk trigger to run on a minimum of 10 record changes.
If you have pipelines that trigger on single and bulk changes in the same Quickbase table and don't explicitly configure this setting, they will both run at the same time. This can result in duplicate changes to records or inconsistent results if both pipelines try to update a record simultaneously.
This article has examples of how to use this setting to configure when a pipeline runs on the same Quickbase table using single and bulk triggers.
In this article
Single trigger example
You want to notify your team when a new task is added, up to 5 items. Beyond that, getting email notifications for each new task isn't necessary.
To do this, create a pipeline with 2 steps:
-
On New Event step to trigger the pipeline when a new task is added.
Configure the step to trigger on a maximum number of 5 records changed. -
Send an Email step to notify the recipient.
Bulk trigger example
You have a Project → Tasks table setup, where each task has a related project. When performing a bulk CSV upload of 100 records into the Tasks table, you want to set the relationship to the Project for each newly created Task.
To do this, create a pipeline with 6 steps:
-
On New Bulk Event step that triggers on records added to the Bulk Tasks table.
Configure the step to trigger on a minimum number of 10 records changed, to ensure the pipeline only runs on mass record changes, like grid edits or CSV imports. - Search step to create a list of all the projects.
- Prepare Bulk Upsert step to set the related project for all tasks that are being inserted into the Tasks table.
- Loop to iterate through the array of records generated by the bulk trigger.
-
Add a Bulk Upsert row to map the respective fields and set the related project with a Jinja iteration:
{% for project in b %}
{% if project["project_name"] == a.project %}
{{ project["id"] }}
{% endif %}
{% endfor %}
- Commit Upsert in the Tasks table.