Forum Discussion

MattMakris's avatar
MattMakris
Qrew Cadet
3 years ago

Pipelines: How to generate list of fields that were modified in "record modified" trigger

I am creating a changelog that multiple tables use. I would like it to report which field was changed, the old value and the new value. If multiple records were changed, multiple changelog records would be created – one for each field modified in the trigger step.

Question:
  • Is there a way to generate a list of modified fields then create an 'create record' loop that creates a changlog record for each modified field?

Thank you!



------------------------------
Matt Makris
------------------------------
  • What I have done in the past for this logging is to record the old and new value for each field I want logged.  But with a single trigger that the record was edited.  of course this means that most of the fields will have the old and new value the same. 

    So I filter those audit log records off the reports and have a nightly process to delete them.

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
  • DougHenning1's avatar
    DougHenning1
    Community Manager
    I don't think you get a list of the changed fields, but you can use $prev to get the previous value of a field (e.g. {{a.$prev.status}} ).  The help has an audit example:



    ------------------------------
    Doug Henning
    ------------------------------