Forum Discussion

GeorgeRomanows1's avatar
GeorgeRomanows1
Qrew Member
3 years ago

Pipelines - obtain count of records processed in a Search step

How do you get a count of the records processed by a 'search' step within a pipeline.

I would like to add this count to a 'create record' step at the end of the pipeline.


------------------------------
George Romanowski
------------------------------
  • My solution was to add a counter field to my table and update by adding 1 every time it loops. Then at the end of the pipeline, I create/update my records with my counter.

    I would love to know if there is a better solution to this as well.

    ------------------------------
    Sherrie Drummond
    ------------------------------
    • MattHardy's avatar
      MattHardy
      Qrew Trainee
      You could possibly create a formula query with the same search parameters as your pipeline search.
      Or to expand on Sherrie's idea, you could create a bucket in your pipeline to store the count rather than updating an existing record. This bucket is temporary and will be removed when the pipeline ends.

      ------------------------------
      Matt Hardy
      ------------------------------
  • While working on something I came across a possible solution. {{a|count}} should return the number of records found in your search

    ------------------------------
    Matt Hardy
    ------------------------------
    • GeorgeRomanowsk's avatar
      GeorgeRomanowsk
      Qrew Member
      Thanks,  {{a|count}}  works.  Just what I was looking for.

      ------------------------------
      George Romanowski
      ------------------------------
    • PaulPeterson1's avatar
      PaulPeterson1
      Qrew Assistant Captain
      This is exactly what I need also, how would I use this as an expression to see if the count is equal to zero (ie, this is the first iteration)

      ------------------------------
      Paul Peterson
      ------------------------------
    • DonLarson's avatar
      DonLarson
      Qrew Elite
      In the syntax

       {{a|count}} 
      ā€‹

      The "a" is the search step?  ā€‹

      ------------------------------
      Don Larson
      ------------------------------
      • PaulPeterson1's avatar
        PaulPeterson1
        Qrew Assistant Captain
        I understand that part, what I would like to do is add a condition to check if the count is equal to zero.

        ------------------------------
        Paul Peterson
        ------------------------------