Trigger

There is an item maintenance screen where user can update item status.

Need to create a report where below details need to be added:

1) If some user is changing the item status through screen then his user id, old status,new status and date of modification
2) If changes is made thorugh any automated program then program name old status, new status and date of modification

Could you please advice how can we capture this details?
Thank You,
 

tamhas

ProgressTalk.com Sponsor
See the manual called
OpenEdge® Getting Started:
Core Business Services - Security
and Auditing
 

GregTomkins

Active Member
We use triggers for this sort of thing.

The problem you typically run into is, sooner or later, somebody will perform a mass update and create a 6" thick report full of data that nobody cares about. At this point, you will either (a) if it's a one-off thing, remember to 'disable triggers' next time; (b) if it's a routine thing, you may end up adding a bunch of configuration and such to say 'we want to log changes to table X, but excluding fields Y and Z'.

IMO it's more proper to centralize update logic somewhere and do whatever logging you need to do in there, but if you have a lot of pre-existing code with updates spread all over the place, triggers may be the only realistic option, and they work reasonably OK, at least for us, in this context.
 

tamhas

ProgressTalk.com Sponsor
Triggers, as a rule, are something I don't recommend since it puts part of the business logic in one place and the rest somewhere else, making it harder to understand what is going on. The one real exception is auditing, since that is merely keeping track of what did happen, not influencing the logic of what is there. But, auditing is a standard feature, so why not use it instead of messing around with your own triggers?
 
Thank you very much for replying.

I am working on environment :
1) QAD mfg/pro eB2.1 version
2) Progress 10.1

So, there i can see one WRITE trigger for pt_mstr table. will this be ok if I modify this trigger?

Or
Can i go for different solution as below ?

I can find program through which this pt_mstr table is getting modified and these program can be modified.

Thanks in advance.
 

Cringer

ProgressTalk.com Moderator
Staff member
The difficulty with modifying anything in your application comes when it's time to upgrade. I would talk with your vendor before venturing on this course of action. I'm also moving this to the QAD forum.
 
Top