Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this chapter, we add auditing of changes to data in our app.

Audit manual data changes

Widget Connector
width900
urlhttps://www.youtube.com/watch?v=0wwfpepnwbE&index=22&list=PLbPt6SI1Zhb_n3lXboTC_Qzq0Kg2x8LtT
height500

Add auditing of manual data changes to your app. To recap the steps in the video:

  • Open the configuration form for the stream Contacts
  • Tick Audit Manual Changes
  • Add attributes to the stream:
    • UpdateAction
    • UpdatedByName
    • UpdatedTime - you must make this a Datetime field

Go into app mode, and make some changes to your contacts data.

Now create a new view to show all history:

  • Create a new dashboard Contacts All History
  • Drag the stream Contacts onto this dashboard, add all attributes to the view
  • Hide the UID attribute
  • Open the view configuration form
  • Update the Name to Contacts All History
  • Tick Include History Records
  • Save your changes

In the new view, you should be able to see full details of the changes you just made to the contacts data.

Add a menu item to the Contacts app to provide a link from the Contacts dashboard to the Contacts Full History dashboard.

  • When you have updated the view configuration to add the menu item, you will need to close and re-open the Contacts dashboard to see it

Audit analysis data changes

Widget Connector
width900
urlhttps://www.youtube.com/watch?v=EuZOKmTk_z4&index=23&list=PLbPt6SI1Zhb_n3lXboTC_Qzq0Kg2x8LtT
height500

Add auditing of analysis data changes to your app. To recap the steps in the video:

  • Open the configuration form for the stream Contacts
  • Update stream attribute expressions:
    • UpdateAction: "IMPORT"

    • UpdatedByName: _user.name

    • UpdatedTime: now()

Note

For auditing manual changes, you must use the spelling (including capitalisation) for these attributes as given above. When auditing analysis changes, you could use any attribute names. But in this case, since we are auditing both manual and analysis changes, it makes sense to use the manual audit attributes to record the analysis audit as well.

Go into app mode. Import the test file: