amidyne Posted July 24, 2008 Posted July 24, 2008 I'm trying to create a database where there are Contacts and the Tasks associated with each of them. Right now on my Tasks Layout there's a portal which will hopefully be able to display the contact name. What I want to do is to go to the contacts layout, click on a button next to the particular contacts name and have it associated with the Task. However what I have managed so far is for a new iteration of the contact to be created as well. I've tried storing the contact name inside a new field and then transferring that to my portal but that hasn't worked either. I hope I've explained my situation clearly, any suggestions?
bcooney Posted July 24, 2008 Posted July 24, 2008 (edited) If you want to relate Contacts to Tasks, then you need to store the ContactID in Tasks as a foreign key, "__kF_ContactID" is the style I use. On Contacts, the button, "New Task" would: Set Variable $ContactID to __kP_ContactID (its primary key) Go to Layout Tasks New Record Set Field _kF_ContactID, $ContactID Read up a bit on primary and foreign keys. You should not relate files using text fields such as names. Edited July 24, 2008 by Guest
amidyne Posted July 24, 2008 Author Posted July 24, 2008 Thanks! For some reason I was trying to associate the contact with the task instead of the other way around. Sad thing is I had figured out that problem in another part of my database
Recommended Posts
This topic is 6025 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 accountSign in
Already have an account? Sign in here.
Sign In Now