Forum Discussion

MattMakris's avatar
Qrew Cadet
2 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.

  • 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

2 Replies

  • 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)
  • DougHenning1's avatar
    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