Jump to content
Server Maintenance This Week. ×

add sth. to a table in many-many relationship


Sima2004

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

Recommended Posts

Hello everybody,

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?

Thanks,

Link to comment
Share on other sites

Hi, Sima. You are on the right track with the script idea. It can be a very simple script. One possibility:

A global text field named, say, choosePaper. Relate that field to paperName in the Paper file.

User enters a paper name into choosePaper (or, better yet, selects it from a value list) and clicks a button labelled "LookUp."

This button triggers a script that sets the appropriate join table field to the ID number matched by that paper name.

I'll be happy to post an example of this if i left out any details.

HTH,

Jerry

Link to comment
Share on other sites

Tahnk you very much Jerry,

I have one more question. Is that possible to add a new paper in to that value list sothat you don't have to go to the table paper and then make a record for new paper and then come back to the journalist and add the paper to that journalist? Can that be done more directly?

Link to comment
Share on other sites

Well, if you have a statically-defined value list, you can use the "Edit..." option to do this. However, if you have a value list based on the contents of another field, unfortunately no, this is not possible. Your best method will be to go to the Paper file and create a new record in the usual way.

J

Link to comment
Share on other sites

Hi ???-)

What i want is to make it possible that the user adds a journalist from the paper table without she needs to make the link by herself in journalist table. I think that would me more secure if i do that for her. So, i've made a new button named add a new journalist, this button makes a new record in the journalisten table, i wish to add the name of the paper at the same time to the portal and the list. I need to bring the media name with me to the journalist table ( i want a variable to save this key in that variable),save the key of the new record for journalist in another variable, and use another script to set this keys in the join table in de fields media & journalist keys! Or i can use the same script that we used befor to put the media name in the portal.

Am i too boring then?

Link to comment
Share on other sites

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