It is currently Wed Aug 27, 2014 7:09 am

Post new topic Reply to topic  [ 2 posts ] 
 Force write to Audit Log 
Author Message

Joined: Mon Apr 04, 2011 4:40 pm
Posts: 486
Location: Hatfield, PA
Post Force write to Audit Log
Hey guys,

Is there a way to force an event to write to the audit log via scripting? Like if I have a editable table that only certain people can edit, can I log if people try to edit it that can't? Right now I have it throw up a error message but it would be nice if I could also log that to the audit log so I have a record of it.

There are 10 types of people in this world, those who understand binary and those who don't.

Doug Keller
Electronics Project Manager
Clemens Food Group

Wed Jul 18, 2012 12:35 pm
Profile WWW

Joined: Mon Jun 04, 2012 8:53 am
Posts: 440
Post Re: Force write to Audit Log
You can put a click event on the table so that you can execute a script, but you have to make sure the security restriction for "disable events" is unchecked. In the script you can run an insert query into audit_events (or whatever you decided to name the audit table), and using some condition checks and client tags, you can write user info to the database depending on which user clicked on the table.

James Lorenz
QA/Build Systems Engineer
Inductive Automation

Wed Jul 18, 2012 1:37 pm
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

Who is online

Users browsing this forum: Exabot [Bot] and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: