Jump to content
Sign in to follow this  
Sima2004

Exchanging value of a field between tables?

Recommended Posts

How can i exchange the value of a field between two tables that have meny to many relationship?

Thanks,

Share this post


Link to post
Share on other sites

No enough information.

You need to explain what you are trying to do, what you have now, and what you want to happen.

Right now, this could be a script step, a calculation, a poor key in the a relationship, etc..

Lee

Share this post


Link to post
Share on other sites

The simplest way to exchange field information between tables - even tables that are unrelated - is to put the data into a global field, then access the global field through a so-called "global" relationship between the tables (create a calculation field in each file that enters "1" into each record, then use this field for the relationship).

The process is even easier in FMP 7, globals are accessible between tables even without a relationship defined (as long as the table has a Table Occurrance defined).

You can also use copy to put the data onto the clipboard, but this is less elegant because it interferes with whatever the user might have copied there; and it is easily broken by the user performing a cut or copy while the process is occuring.

Share this post


Link to post
Share on other sites

No enough information.

You need to explain what you are trying to do, what you have now, and what you want to happen.

Right now, this could be a script step, a calculation, a poor key in the a relationship, etc..

Lee

My problem is as follows:

I have three tables named (paper, journalist, join) and a many to many relationship. The join table is a join between the two main tables.

It is now too difficult to add something to or delete something from the tables. Each time that the user want to add sth. he should memorize the key of the wanted record in paper table and the key of the wanted record in journalist table and in order to make a relation between these two records he should make a new record in the join table and add the keys to that record, the information of both records from the main tables come in to this new record in the join table via cal. fields. This is ofcourse not user friendly, it takes too much time to add sth. to the tables and u can make very fast an error, if u type the key not correctly then u make a wrong relation.

What i'm searching for is a way( a script or sth else)to make it more easy and direct for user, i was thinking of two buttons on both main tables to do that add process for the user without the necessity of going to the join table.

Is that possible? Has somebody a suggestion for me?

------------------------------------------------------------------------------

Hi Lee,

What i want to do is to type a name in my paper table and click a button to run a script in a join table(the relation between Paper & Journalist) add this name to my journalist table. I want that this script make a new record with the Paper key and search a name for me in the table journalist a

There are two possibilities:

1)the name is already exists in the table Journalist ==> i want the key of that journalist to add to the join table.

2)the name doesn't exists ==> i want to add a record to the journalist table with that name and give the key back to the join table as well.

I can use external scripts to do the search operation but how can i give the key back and place it in the field that i want in the join table?

That is all.

Is that possible?

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.