Forum Discussion

DavidBrogdon's avatar
DavidBrogdon
Qrew Assistant Captain
7 years ago

Need to track and calculate a changing numeric field

My boss has informed me that from an auditing standpoint, users should not be allowed to change the original order quantity field, but instead we should design a system that logs each numeric change (for example -5 or +9), while also using each value in a transaction log so that the final total (whether + or -) can be added to the original value in order to get the true value. 

Any ideas on simple yet effective ways to implement this? 

Thanks for any help. 
  • SuryaExpert's avatar
    SuryaExpert
    Qrew Assistant Captain
    Can be done with a webhook or automation. If you need to record the old value and the new value of the order quantity field, use a webhook as you can access the old value as well as the new value in a webhook.
    • DavidBrogdon's avatar
      DavidBrogdon
      Qrew Assistant Captain
      Would I just create a record in a different table every time the value changed in the source table/record?
    • SuryaExpert's avatar
      SuryaExpert
      Qrew Assistant Captain
      Yes. Create another table and make sure the webhook adds a new row in that table whenever this field changes. Technically speaking, you could extend this to other fields on the orders table as well. It is your call, though.
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      Yes, you would create an audit trail child table and record the old and new values.  if there are multiple fields to track, then include in the child table and identifier of the field that was changed.  Like Cost or Sell.

      Using an ACTION will allow you to record the old and the new value.  Automations don't yet do the "old" value,.