Forum Discussion
I think you are inventing syntax here that is simply not supported. But I have a suggestion.
First, have the trigger type be "On New Bulk Event". That will ensure that the records get processed one by one and you don't have a race condition where multiple records might trigger at virtually the same time if records were somehow created or approved by some kind of mass update like grid edit.
Do a normal search step (no Jinja) in the Pipeline to look for records matching the same
[Location Code]
[Order Department]
[Date Approved] (if necessary make a helper field in Quickbase so you have a clean filter on date .. or maybe that is what you meant by fid 39).
Then ask Chat GPT this:
"Is there Jinja Syntax which can be used in a Quickbase Pipeline which can return the size of a prior Quickbase Search step"
Yes — in a Quickbase Pipeline (which uses Jinja syntax) you can get the size of a prior Quickbase Search step.
✅ The key pattern:
If your previous step is something like “Search Records”, it returns a list (array) of records. In Jinja, you can use the built-in length filter.
{{ a.records | length }}
- a = the step name (replace with your actual step label)
- records = the list returned by the Quickbase search
- | length = counts how many items are in the list
I think what I would do would be to have a Conditional Branch right after the search step to check of the search was empty. Then branch off to logic where your numbering needs to start at 1. Chat GPT says it will not return a clean zero if the search result is null.
Then for the other branch where the search is not null, so per ChatGPT to add 1 to the result, the syntax should be like this.
{{ (search_customers.records | length) + 1 }}