/
Audit Log Exercise

Audit Log Exercise

Exercise: Checking User History with Audit Log Table

Audit Log Configuration

  1. Enable the Audit Log. To do this, go to File > Project Properties. Scroll down the list to the Audit Log section. Click Enable. This will enable the use of Audit Log in the project.

 

 

  1. Create a BOOL tag named “Switch”. The initial value will be set to false. Once the tag is created, click OK to apply these changes.

 

 

  1. Go to Tools > Identity and Access Management… or select Open Identity and Access Management… on the toolbar. Create a new User. Name the user “Main.” Set the password to “123”.

 

  1. Create two Rectangles. One will be located on the top left, and the other on the top right. For the top left Rectangle, go to Actions, and under On Press, create a new command that will open the login window. For the top left, go to Actions, and under On Press, create a new command that will log the user out.

 

 

 

  1. Create a Switch/Lamb object. Place the Switch/Lamp in the bottom left of the page. Once placed, click and hold the Switch tag and drag it to the Switch Lamp. This will bind the Switch tag to the Switch/Lamp. Now go to Actions, and under On Press, create a new command that will toggle a tag. Select the Switch tag.

 

 

  1. Now, create an audit log table. To do this, go to Insert> Audit Log Table. Once selected, click and drag the audit log table over the screen.

 

 

Audit Log Runtime

  1. Click Tools >Launch Simulator to launch the Canvas Simulator.

 

 

  1. Click the top left Rectangle and log into the Main account.

 

 

  1. Click the Switch/Lamp about six times. Once done, click the top right button, and then click it six more times.

  2. Now click the Search button on the Audit Log Table.

 

 

  1. Now type “Main” in the User search box and click Search. This will bring up only results that the user did when logged into the User “Main.”

 

 

Back to top of Audit Log Exercise

Related content