Skip to main content
Question

Help with advanced filter in pipeline

  • Mar 23, 2026 8:00 PM UTC
  • 1 reply
  • 68 views

Forum|alt.badge.img

Hi folks. I am trying to get an advanced filter to work in a pipeline so that I don't have to enter all 81 combinations in.
I don't speak Jinja (yet), so I used AI to help me code this. It looks good to me, but when we ran a test, the pipeline did not trigger. I assume it has to do with the way which the Jinja is written. Can anyone help me understand what I did wrong, here?

Here is the offending code. It's also been tried without the various cleanup filters on the fields (trim, float, string).

All string values for these fields come from pre-defined lists, and the two hours fields are numerics. I think the problem has to be either the syntax or references; I don't think the actual logic is bad.

{{

(a.Req_Status|string|trim) == 'Submitted'

and (a.Requested_Hours|float) < (a.Provider_Expected_Hours|float)

and (a.Approv_Mgr1_Response|string|trim) in ['Approved', 'Not Available', 'Not Required']

and (a.Approv_Mgr2_Response|string|trim) in ['Approved', 'Not Available', 'Not Required']

and (a.Approv_Dir1_Response|string|trim) in ['Approved', 'Not Available', 'Not Required']

and (a.Approv_Dir2_Response|string|trim) in ['Approved', 'Not Available', 'Not Required']

and (a.Approv_Oversight_Response|string|trim) == 'Pending'

}}

Thanks for your help!

1 reply

Top Step
Forum|alt.badge.img+12
  • Observing
  • Oct 15, 2026 11:20 PM UTC

That expression is valid Jinja, but it won't work as a Quickbase trigger condition or Advanced Query filter. Trigger conditions can't use Jinja unless the channel docs say they can, and Advanced Query / filter fields use Quickbase query syntax — not a full Jinja boolean. That's why the pipeline never fired.

Simplest fix: keep the trigger wide (for example Record Updated when Req Status changes), then add a Condition step and put your Jinja there. Condition steps are where complex and / in logic belongs.

If you need it in Advanced Query instead, rewrite with uppercase operators and AND/OR. Field-to-field hours compare uses _FID_n. Approval "in a list" becomes ORs of EX. Sketch with your field IDs filled in:

{ReqStatusFid.EX.'Submitted'}AND{RequestedHoursFid.LT._FID_ProviderExpectedHoursFid}AND({Mgr1Fid.EX.'Approved'}OR{Mgr1Fid.EX.'Not Available'}OR{Mgr1Fid.EX.'Not Required'})AND({Mgr2Fid.EX.'Approved'}OR{Mgr2Fid.EX.'Not Available'}OR{Mgr2Fid.EX.'Not Required'})AND({Dir1Fid.EX.'Approved'}OR{Dir1Fid.EX.'Not Available'}OR{Dir1Fid.EX.'Not Required'})AND({Dir2Fid.EX.'Approved'}OR{Dir2Fid.EX.'Not Available'}OR{Dir2Fid.EX.'Not Required'})AND{OversightFid.EX.'Pending'}

 

You can still embed {{a.some_field}} inside a matching value, but the structure around it has to stay query syntax.

https://help.quickbase.com/docs/use-the-quickbase-channel 

https://help.quickbase.com/docs/jinja-reference 

https://help.quickbase.com/docs/api-doquery 

https://help.quickbase.com/docs/adding-conditions