Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

New to Filemaker so would appreciate some advice. Each time I delete a record in the main database I want to write a copy of it to an associated journal file. How should I go about this ? Thanks, Arthur

Posted

Make your delete function a button that runs a script. The script will isolate the record to be deleted as a found set of one. If you are always working with all records displayed, the script could be as simple as Omit Record, then Show Omitted.

If you are working with a subset of data, then your script will need to copy the unique ID, Enter Find Mode (restore off), Paste or Insert the copied ID into ID field, and Perform Find (restore off).

Now that you have only the one record as a found set, add a Perform Script (External) command. This will run a script in the associated journal file that will import from your main file. Set this up by running a manual import on a sample record from the associated file, to set field mapping, etc. When importing from one FM db to another, it will always import whatever found set is available in the source file. Once you've done it manually, make a one-line script in the associated file that is the Import script function (restore on). This will be the external script you call.

Now that the record has been imported, your next command after Perform Script (External) would be to Delete Record (dialog off). Then, possibly, Show All Records to avoid leaving the user with a found set of zero.

The effect, when clicking the button, is that the record vanishes and simultaneously appears in the associated journal.

Steve Brown

This topic is 7587 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.