Skip to main content
Solved

Pipelines - Get Length of List of Pipeline Rows

  • June 15, 2021
  • 0 replies
  • 269 views

Hello,

I am trying to schedule a weekly calculation every Friday using Pipelines. The calculation process is as follows:

  1. Select the 20 most recent records from a QuickBase App table, sorted by a date lookup field (I also can't get this to work, but I will make another post about this issue).
  2. Define a Pipeline Rows table using the Bucket channel.
  3. For each of the 20 QB App table rows, store them all in the Pipeline Rows table.
  4. Search the 20 Pipeline Rows table to return a filtered list of Pipeline Rows whose fields match certain conditions.
  5. Search the QB App table again for all records created over the past week.
  6. For each of those QB App table records created over the week, update a field with: (# of Pipeline Rows matching the conditions / 20).

I was able to successfully return a filtered list of Pipeline Rows that match the conditions. But when I try to perform step #6 and update the records with {{length(d.record_id) / 20}}, I get this error: Validation error: Incorrect template "{{length(d.record_id) / 20}}". UndefinedError: 'length' is undefined.

Is there a different way I should be trying to get the number of filtered Pipeline Rows out of the 20 selected that match the conditions in order to use it in my calculation?

​​

------------------------------
Ryan Peart
Database Analyst
Minerva Knowledge Management
------------------------------

Best answer by QuickBaseJunkie

I think the Jinja you're looking for is {{ (d | count)/20 }}.

This would return the count of records found in step D then divide by 20.

If you're interested in learning more about Jinja I suggest checking out my blog post "What is Jinja" and my course "Intro to Jinja for Pipelines"

------------------------------
Sharon Faust (QuickBaseJunkie.com)
Founder, Quick Base Junkie
https://quickbasejunkie.com
------------------------------
This topic has been closed for replies.

QuickBaseJunkie
Forum|alt.badge.img+15
I think the Jinja you're looking for is {{ (d | count)/20 }}.

This would return the count of records found in step D then divide by 20.

If you're interested in learning more about Jinja I suggest checking out my blog post "What is Jinja" and my course "Intro to Jinja for Pipelines"

------------------------------
Sharon Faust (QuickBaseJunkie.com)
Founder, Quick Base Junkie
https://quickbasejunkie.com
------------------------------