Skip to main content
Question

Copying data from a table to a seperate table on save/update


Forum|alt.badge.img+4

If I have a form that I am having a user fill out, what is the best way to copy that data (or specific fields) from that form to a new table?

The form is for an approval and could be an "update" or a "new process" that needs to be approved. I'd like to copy all the requested updates to one table and the new requests to a separate table.  Ideally, I'd like to send updates over from the main form as well  (pending to approved/rejected, date modified, etc). 

I believe I could use a pipeline. Is that my best bet? and if so, is anyone aware of any decent posts that would provide a little guidance?

MarkShnierYou
Forum|alt.badge.img+24

Yes, you can use a pipeline but a far better solution is to reconsider your approach.

The best practice here is really to have a status field on the record and then have different reports and different notifications and subscriptions based on that status field. You will likely regret it in the end if you start making Duplicate tables. For example, if you decide to add a field to your form in one table, then you are going to need to add that field into other tables and keep the forms consistent.


MarkShnierYou
Forum|alt.badge.img+24

There are techniques which work well when you have a limited number of fields to track to record an Audit Trail of every field changed. So to record the old value and the new value and who made the change and if course the date time stamp. 

That can be shown in the form so the history is all conveniently all visible without needing to flip back and forth between records in different tables.