Custom data

K

kernel

I would like to determine what data has changed for a project (inserts,
modifications and deletions). I would like to use a post-publish event to
calculate the 'change' and record to a custom table.
Are there any guidelines for creating custom tables?

Alternative solutions?
 
B

Bryant Likes

kernel said:
I would like to determine what data has changed for a project (inserts,
modifications and deletions). I would like to use a post-publish event to
calculate the 'change' and record to a custom table.
Are there any guidelines for creating custom tables?

I've been working on something that sounds similar lately and here is the
approach that I've taken.

First I created a working database which has all the items that I'm
interested in tracking plus the columns that I care about. So for example
tasks is an obvious one. So for tasks I created three tables.

Tasks
TaskRevisions
TaskTombstones

Second, I created event handlers for project saved and project published
(will need one for updated to handle PSI updates, but still working that
part of the plan out). When a project is saved I write the updated tasks to
the revisions table. The way to figure out what changed is by the
mod_rev_counter field. If that field is the same as the project's
mod_rev_counter field then it was changed during that save. You can track
who saved it by using the PSContextInfo user name field on the event. For
the published event I just write the task record if the mod_rev_counter
changed.

Note: I keep this all in a seperate database because that way you don't mess
up/clutter project server.
Alternative solutions?

Haven't found a good one yet. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top