Forum Discussion

Re: Pipelines - Get Length of List of Pipeline Rows

I do want to get the resulting records from step D. However, step D is using the 'Search Pipeline Rows' function from the Bucket channel. Could that be the reason why {{ (d | count) / 20}} isn't working? Does Jinja only work for the 'Search Records' function in the QuickBase channel? 

I created a bucket because I am performing a query upon a query. I need to get the latest 20 records, and then search within those records for the records that match a certain criteria. Would it be easier if I tried to put all the filter criteria into the initial Search Records step (Step 1 from my initial post)?

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

4 Replies

  • QuickBaseJunkie's avatar
    QuickBaseJunkie
    Icon for Qrew Legend rankQrew Legend
    I'm not 100% sure about the "Search Pipeline Rows" function and that the 'count' Jinja.

    However, I'm not certain the approach your taking is right for what you want to accomplish either.

    For your initial sorted search limited to 20 items (step 1), it would be ideal to use the JSON channel with the query API here: https://developer.quickbase.com/operation/runQuery
    After iterating on that data, run a webhook including your criteria to filter out the unneeded records (step 4) and then update (step 6) those records as necessary using this API: https://developer.quickbase.com/operation/upsert

    (I'm unclear how step 5 fits in) 

    This is a much more advanced use of Pipelines as it involves quite a bit of JSON & Jinja. Too much to explain here on the forum I'm afraid.

    Hopefully, this information will point you in the right direction.

    ------------------------------
    Sharon Faust (QuickBaseJunkie.com)
    Founder, Quick Base Junkie
    https://quickbasejunkie.com
    ------------------------------
    • NathanAllan3's avatar
      NathanAllan3
      Qrew Trainee
      I'm trying to use this count function to branch my pipeline if it finds records. I'm using this as my syntax

      {% if {{(c | count)}} >= 1 %} {{true}} {% endif %}

      and for some reason it's saying "validation error: Incorrect template" Type Error: object of type  'Record' has no len().

      What do I need to change to fix that?

      Thank you!

      ------------------------------
      Nathan Allan
      ------------------------------
      • QuickBaseJunkie's avatar
        QuickBaseJunkie
        Icon for Qrew Legend rankQrew Legend
        Hi Nathan, 

        You'll need to remove the {{ }} from around c|count. They are not needed since it is already contained within the {% %} jinja statement.

        Let me know if that removes the error.

        -Sharon

        ------------------------------
        Quick Base Junkie
        ------------------------------