Get Expert Help

Quick Base Junkie Blog

Short videos and posts to skyrocket your Quickbase skills!

Get tips in your inbox

Join the Quick Base Junkie Community email list!

Simple Solutions: Top 5 Simple Pipeline Hacks for Quickbase

advanced intermediate jinja pipelines simple solutions May 01, 2024


I've been working with Pipelines for a while now and by necessity, or by accident, I've come across a number of hacks that have saved me time and/or have increased the pipeline's functionality.

Here are my Top 5 Simple Pipeline Hacks!

 #1 Copy/Paste Fields

When specifying fields for use in steps, after adding your fields you can click on the code mode icon to the right of the field (or pencil icon if using the old designer) to reveal a comma-separated list of field ids.

You can easily copy this list and paste it into a similar "select fields to specify values" box when repeating a similar step or when making a similar pipeline.

To paste the list of values, you'll first need to click on the code mode </> icon. When you click off of the box the field names should appear. However, sometimes I've noticed the names do not immediately appear, but the fields below them do.

NEW DESIGNER

OLD DESIGNER
 

 

 

 #2 Access Previous 'Old' Values

In automations, webhooks, and notifications it's possible to access the 'old' version of a field. The old version is the value of the field prior to the most recent save that trigged the action.

This makes it possible to capture from/to field changes.

This is also an option in Pipelines, though it isn't obvious and the syntax is different.

Wherever you are populating a value such as {{a.status}}, you can add "$prev." before the field name, like this: {{a.$prev.status}}.

For example, you may want to add a note showing the from/to status change:

NEW DESIGNER
(turn on code mode using the </> icon)

The status changed from "{{a.$prev.status}}" to "{{a.status}}".

OLD DESIGNER

The status changed from "{{a.$prev.status}}" to "{{a.status}}".

 

 #3 'Revert' to Prior Version

If you make an accidental change to a Pipeline that previously ran prior to the change, you can "revert" back to that saved version of the pipeline.

  1. Open the Activity for that Pipeline for the last time it ran with the configuration you want to revert to.
  2. On the right side, look for the link to "View Pipeline Summary"
  3. Copy the YAML displayed on the screen
  4. Return to the Pipeline Dashboard
  5. Click on the down arrow next to "Create Pipeline" and select "Import Pipeline"
  6. Paste the copied YMAL into the bottom box
  7. Click "Import Pipeline"
  8. Verify it looks good, then delete the "old" Pipeline

 

 #4 Is Empty Condition

What happens if your Search/Query step comes up empty?

When a search is empty you may want to take specific actions such as sending an email or creating a new record.

But how?

Using a condition, that's how!

Steps using the New Designer:

  1. After the Search's "End of loop" (and not inside of it), click on "Add a Step"
  2. Select "Condition" from the top of the add a step menu
  3. On the left side of the condition box, select your Search step
  4. On the right side, select "is empty" (it will default to this initially)
  5. Add additional steps below the condition on the left (if condition is met) or right (if condition is not met) based on what should happen if the search comes up empty

NEW DESIGNER

Steps using the Old Designer:

  1. After the Search's "For Each - Do" loop  (and not inside of it), click on "Insert a condition"
  2. Click on "Add conditions" and select the search step from the dropdown
  3. Select "is empty" (it will default to this initially)
  4. Add additional steps below the condition based on what should happen if the search comes up empty (under the 'then') or if it is not empty (under the 'else')

OLD DESIGNER

 

 #5 Use Jinja

Jinja, Jinja, Jinja... I can't say enough about how important it is to know some Jinja.

Jinja is the programming language that we can use in Pipelines to do all sorts of cool things!

Below are a few example to get you started.

Add two values together

NEW DESIGNER (turn on code mode using the </> icon)

{{a.value_1 + a.value_2}}

OLD DESIGNER

{{a.value_1 + a.value_2}}

 

Clear/remove/delete a value

Must use all caps

NEW DESIGNER (turn on code mode using the </> icon)

{{CLEAR}}

OLD DESIGNER

{{CLEAR}}

 

Clear/remove/delete a value when null/empty

If the field populating is null/empty, clear the value, otherwise enter the updated value.

Strangely the Pipeline will not recognize that the value is null, so the pipeline will not overwrite an existing value with 'null' unless it is specified like this.

NEW DESIGNER(turn on code mode using the </> icon)

{{ CLEAR if a.status is none else a.status }}

OLD DESIGNER

{{ CLEAR if a.status is none else a.status }}

 

Reverse a checkbox

From checked to unchecked or from unchecked to checked.

NEW DESIGNER (turn on code mode using the </> icon)

{{not a.checkbox}}

OLD DESIGNER

{{not a.checkbox}}

 

Count the number of items found in a search/query

(where the search step is A) Note, this is used after the search and outside of the "For Each - Do" loop

NEW DESIGNER (turn on code mode using the </> icon)

{{a|count}}

OLD DESIGNER

{{a|count}}

'Old Designer' EXTRA Tip: If you need to enter Jinja in a multiple-choice field, click on the pencil icon first to write or paste in a value.

I highly encourage you to start a log of all the Jinja you use and find useful. I have one myself that I refer to often.

For access to my library of 50+ Jinja functions and video guides on using Jinja, check out the Intro to Jinja for Pipelines course.

I hope you've enjoyed these 5 simple pipeline hacks! 

 

 

 

Feeling like a Junkie?  Subscribe Now!