Forum Discussion

AmyChristensen1's avatar
AmyChristensen1
Qrew Trainee
3 months ago

Pipeline Query Trigger On Change From Specific Value

I'm trying to set up a pipeline that will trigger when a Status field changes from "Inactive" to any other value. All I've been able to find is this thread from several years ago, that I can't respond to at this point: Pipelines - how to look at original value and new value of field?

I have attempted two versions, {a.$prev_Status}='Inactive' and {a.$prev.Status}='Inactive'. Neither triggered when I updated a record. 

I have included a screenshot of my trigger setup, any idea what I'm doing wrong or another way to get the result I'm after?



------------------------------
Amy Christensen
------------------------------

3 Replies

  • I don't think that approach will work.  I think that you will need to create a field to hold the previous status and initialize it with the value of the current status.  The easiest way to do that is to make a formula field equal to the status and then change it to be a data entry field.

    Then you will need to have a pipeline to maintain the previous status value by firing whenever the status changes  and writing out  the previous status with syntax similar to what you posted.

    Then you will have a pipeline trigger on status change and will be able to have two solid fields to compare, the [Status] and the [Previous Status] fields in your table.



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
  • DougHenning1's avatar
    DougHenning1
    Community Manager

    I don't think you can do it in the advanced query, you need a condition after the query.  In step A, the basic filter would be status is not "Inactive":

    Then add a condition step after it to check for the previous value:

    Hope that helps!



    ------------------------------
    Doug Henning
    ------------------------------
    • ChayceDuncan's avatar
      ChayceDuncan
      Qrew Captain

      Doug is correct - the pipeline cannot trigger from the old value - you will need to do it in a condition as he suggested where you check if the $prev value is Inactive and then run your steps underneath that condition. 



      ------------------------------
      Chayce Duncan
      ------------------------------