Jump to content

Record modification creates a new record in a related tables


This topic is 2575 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I have no idea how I can make something like versioning of a field. I have 2 tables. The first one with products related to tabled with prices. I'd like to store every change of a price in the second one. 

Posted

Hi Spand,

You will need a table for the change. Every time a change is made to the field containing the price you should use two triggers:

  1. On Modify to grab the previous value (store it in a global variable)
  2. On Save to grab the new value (store it in a variable)

Then you can make your script store these in your change table (Price_Log, e.e.g) with the timestamp and the modifying account.

So you'll need two scripts that perform these functions: one for the on modify trigger and the other one to store the values in your log table.

Also, before an admin "yells at you" please fill out your profile so we know what version of FileMaker and OS you are on.

 

Hope this helps,

This topic is 2575 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.