Beme MD
Beme MD

Reputation: 13

Powerapps - How to Audit Trail?

How would you do to implement Audit Trail eg. add User Action(edit, new, delete, print), OldValue and NewValue in a separate "Audit Trail" table? Something like this:

 ID | DATE    | USERNAME | FORMNAME | ACTION | FIELDNAME | OLDVALUE | NEWVALUE 
 01    180513   user       form1      edit      Risk         Low       High

Old values must not be overwritten and I am kind of a stuck there because "patch" overwrites old values...

Upvotes: 0

Views: 1441

Answers (1)

SeaDude
SeaDude

Reputation: 4415

One option may be to confirm each change.

Example:

  • If user changes an auditable field, show confirmation popup.
  • Use the OnSelect Property of the "Confirm" button to write a new line to the Collection/Data Source
  • Use the Defaults line in your Patch command to APPEND this line to the Collection/Data Source each time rather than overwriting it.

Good luck!

Upvotes: 1

Related Questions