Forum Discussion

joevandervest's avatar
joevandervest
Qrew Cadet
2 years ago

New Form - Rule Trigger for Field Value Change OR accessing old value?

Context:   In old forms I had a rule that that would WRITE the old status to a log field when the user CHANGED the status of a transaction. (e.g. New to Complete, New to Hold, etc.). This was achieved by using a dynamic form rule triggered on the field value change upon SAVE. 

Additional Note: Thanks to @Mark Shnier (Your Quickbase Coach) post about "$prev." in Jinja I know we can do it there in a pipeline - but that isn't a desirable method. 

Possible Work Around in New Forms: Use the old form or create a pipeline on record save and use $prev. I tried playing around with New Forms rules formula builder - but still seem to lack a way to access the OLD Field Value and an Action trigger. 

Wasn't there some way to access an old field value within a formula so that I could use the New Form rules formula builder to create a boolean for   [Status] <> [old.Status] as a trigger? 



------------------------------
joe vandervest
------------------------------

3 Replies

  • I believe you just need to change setting of this Form Rule and un-check "Run change action when a condition changes from false to true".




    ------------------------------
    Adam Krzyzanek
    ------------------------------
    • joevandervest's avatar
      joevandervest
      Qrew Cadet

      Thanks Adam, that part would work just fine. The issue is that there DOES not appear to be a way to convert the rule below to the New Forms because it appears that there..

      • is no trigger "if the value in field x has changed"
      • is no way to access the previous value of the field if it has changed 
      It would seem that a PIPELINE is the only way to achieve this using a New Form. 


      ------------------------------
      joe vandervest
      ------------------------------
      • AdamKrzyzanek's avatar
        AdamKrzyzanek
        Qrew Captain

        Indeed for this Pipeline is an option to capture previous Status value.



        ------------------------------
        Adam Krzyzanek
        ------------------------------