Jump to content
Sign in to follow this  
Greg O'Connor

Creating record in two tables

Recommended Posts

Hello.

When I create a new record in one table, I would like FileMaker to automatically create the same record in another table. Is this possible? Any ideas how to do this without using a script?

Any help would be very much appreciated.

Thanks

Greg

Share this post


Link to post
Share on other sites

Before we answer a question like this, its good to understand why... Data duplication is highly unrecommended where its not entirely necessary.

Can you give some extra background on this scenario?

Share this post


Link to post
Share on other sites

Well the datafiles in the separation model can have their own layouts... but in another table isn't it really, but in another file!

--sd

Share this post


Link to post
Share on other sites

One record (Initial Enquiry Record table) will be edited from time to time.

The second record (Archived Enquiry Record table) must stay as the original record.

This is why I need to create the record in 2 tables.

Greetings

Greg

Share this post


Link to post
Share on other sites

Well you'd have to script the original copy anyway because who's to say the user finished entering data when they first commit a record?

Essentially, the best way to do this would be with a button to commit the changes.

Share this post


Link to post
Share on other sites

The record is added via a web form (Lasso), this is why I do not want to use a script. Yes, I could add from the web form to two tables, but I want to find a way that FileMaker does the job.

Greetings

Greg

Share this post


Link to post
Share on other sites

Hi Greg,

Well, you can really do one of two things.

A) keep the archive record in the same table, and simply have an "active" definition -- that way you can just use duplicate record.

??? Add a join table whos sole purpose is to hold the keys of "active" records -- i.e. similar to the above method, but instead of controlling which records are browsable via script, add the id of every active record to this table and base your layouts on this table with all necessary fields being drawn from your main table.

C) After creating the record, collect all the data into a variable, go to the other table, parse it out into the corresponding fields.

4) Use the import script step to import the record into the second table -- though im not sure how that will work with Lasso, if at all(web sessions still sort of confuse me)

and E) Make your lasso script dynamic... and have it post the data twice.

Okay.. maybe theres more than 2 but myeah...

Share this post


Link to post
Share on other sites

Well at first sight would I land my solution in the second Genx' harbours, but there is more to the problem than as such:

http://www.fmcollective.com/2006/12/postdesign_cauc.html

--sd

Share this post


Link to post
Share on other sites

Thanks Genx.

I thought there may be an easy solution using a relationship to generate the same record in a separate table (...not using a script). As per now it does not seem to be straight forward to achieve that.

Now, I 'tend' to post the data twice from Lasso, ie the same data into two tables using session_Id as key.

Greetings

Greg

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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