Forum Discussion

LB's avatar
Qrew Trainee
7 months ago

Best Solution to create audit/change logs


I feel like what I'm needing could have been done with the previous automations feature, but I'm trying to do this in a pipeline and it's very cumbersome and honestly too much coding...

Is there a better and more simple way to create and track record changes in a table?

I feel like the Pipelines feature doesn't fall in line with low-code, no code branding, and I've spent so much time researching on how to set this up in a pipeline :(


8 Replies

  • I don't really think there's much difference in the set up between automations and pipelines but let me explain how I do audit log changes.  

    I create a single table to hold all the audit logs. The fields will be the table name, the field name, the old value and the new value and the user who made the change.  

    I then have the pipeline trigger say any of a list of 10 fields change on the parent table which needs to be tracked.  I then have the pipeline have say 10 steps in it to write out the name of the table, the field name, the old value, and the new value (there is syntax to get the old value),  and the last modified by,  into this child audit log table.  I also write out the key field or the Record ID field of the parent table which had to change.  

    OK, now we just put an embedded report on the parent table of all the audit log records where there was no change between the old value and the new value. Then of course 90% of the records in that table will have no change and we don't need those so part of the process of writing out those records could be to scan those records looking for that situation and deleting them or else running overnight purge to delete all of the records very efficiently where the old value in the new value is the same.  

    Mark Shnier (Your Quickbase Coach)
  • What specifically do you need to audit? Are you trying to track individual field changes or just that a record was updated? Pipelines works much the same way as Automations, slightly different syntax. 

    For example if you have a Project Status Field that you want to audit changes to, you can use as an example {{a.project_status}} and {{a.$prev.project_status}} and you could create a log entry in a table that shows the new and old status along with who changed it and when. 

    Unfortunately Audit Logs given how far and wide they could/would be used if they were a standard feature make them something you'll have to handle on a case by case basis. I do various audit logs where I do the above and set conditions to see first if each field changes between its current and previous value, and it they're different I create an audit entry logging the old and new, who changed it, and when they changed it. 

    Chayce Duncan