July 24, 200817 yr 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?
July 24, 200817 yr 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, 200817 yr by Guest
July 24, 200817 yr Author 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
Create an account or sign in to comment