Jump to content

Creating record in two tables


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

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

Link to comment
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?

Link to comment
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.

Link to comment
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...

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

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