Skip to main content
Question

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

  • August 31, 2022
  • 0 replies
  • 112 views

MattMakris
Forum|alt.badge.img+7
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
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • August 31, 2022
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
------------------------------

Forum|alt.badge.img+6
  • Quickbase Staff
  • September 1, 2022
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
------------------------------