Adding/Attaching Contact details onto new tables

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 22
Joined: Tue Feb 27, 2007 6:18 am
Location: London, UK
PostPosted: Tue Aug 14, 2007 10:29 am
Hi.

I've set up some new tables that are to integrate our past databases with the calender.

The main ones are 'Correspondence' (for generating and keeping record of letters and faxes and emails)

'Purchase Orders' (for placing itemized orders to suppliers and generating collection notes)

I've already set up all the entry and printing layouts...

What I am having problems with is connecting these new tables with the contact details.

I have created contact id fields in each new table, which is linked with the 'ContactId_kprime' in Seedcode's contacts. I have played around with mimicking the way projects tables are connected to the contacts details, but nothing comes up for the address, fax number, etc. (I have 'lookup fields' set up for the addresses & phone numbers in the new table)

the way the contact is selected, let's say for a letter, is through a drop down list displaying values from a list called 'all contacts'.

This works fine in selecting the contact, but I need the related addresses and contact info to fill in which it won't (similar to how they are linked in the Projects)

Any help on the basics and what I'm missing out on would be very appreciated.

Once I have that generated, I also will need to be able to fill in multiple contacts on one form: i.e. 'collection address', 'delivery address' also.

Thanks!

*k

:D
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Aug 14, 2007 12:31 pm
Hopefully this will help get you started...

Selecting a Contact. Instead of using a value list, consider calling the calendar's "Select Company/Contact ..." script. This script is well documented and can be run with a simple parameter like "Operation = Begin ; Action = Choose". When run with this parameter it will return the selected contact ID into the global field Filter::FilterContactID_kf_Glob, from which you can add the ID to your PO, letter, etc. We believe this is much nicer than presenting a list of thousands of names; plus, you can create new contacts right from within the select contact window.

Showing the Address, etc. If you look at the project section, you'll see that we don't have lookups, etc. in the project record for the contact's address and phone number. We show these values from a table occurrence of contacts attached to projects. In fact, we show a table occurrence of the Contacts' phone numbers themselves so that users can add a phone number right on the project layout. Check out the relationships between Projects, ProjectContacts, and ProjectContactPhoneMain to see what I mean. You'll want something like this (POContacts and POContactsPhoneMain) off your PO table occurrence.

Hope that helps,

John
John Sindelar
SeedCode
Posts: 22
Joined: Tue Feb 27, 2007 6:18 am
Location: London, UK
PostPosted: Tue Aug 14, 2007 1:10 pm
:D :D :D :D

thanks john! i had a head start and already created the tables you described above.

when i've modified the select contact script you mentioned and apply to my new tables it seems to work fine.

(the 'lookup' i mentioned was in relation to a calculation in a company id field in projects that went like this: ProjectContact::ContactCompanyID_kf)

but i would really like to be able to use the list function with auto enter selected as if you start typing in it's relatively quick and is the way that our studio is used to finding/selecting. still can't get that working but will use your way til i figure it out.

the next step i'm moving onto is to be able to have multiple contacts on one form/table..

i.e. our purchase orders and collection notes need the ability to generate the following:

supplier contact/address

ship to contact/address
bill to contact/address

collection from contact address
delivery to contact address

what would be your advice on starting this up? would i have to replicate x4 the contact id's and relationships on the table?


i.e. on one table the following fields:
supplier contact_IDkf
ship to contact_IDkf
etc...

& then a set of tables/relationships for each type of contact?

i'm not sure if i'm explaining the above correctly or not but if you need more info please ask.

*k
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Aug 14, 2007 1:25 pm
msskat wrote:what would be your advice on starting this up? would i have to replicate x4 the contact id's and relationships on the table?


i.e. on one table the following fields:
supplier contact_IDkf
ship to contact_IDkf
etc...

& then a set of tables/relationships for each type of contact?


That's right. That is exactly how I'd do it unless the Role and Number of the contacts associated with a PO (for example) is going to change a lot: for instance, if you imagine sometimes having 4 delivery addresses. In that case I'd create a new join table linking Contacts and Purchase Orders, where each "address" on a PO is a record in this join table, some labeled "supplier" some "delivery" etc. That setup is more flexible in theory but can be trickier to print on a PO or invoice (if you do this, think about printing the related addresses as a portal, but printing them always in the same order).

Again, I'd try to do it with the 4 IDs and relationships you suggested.
John Sindelar
SeedCode
Posts: 22
Joined: Tue Feb 27, 2007 6:18 am
Location: London, UK
PostPosted: Tue Aug 28, 2007 2:44 am
thanks john!

i set up the extra tables and it seems to be working.

*k

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 1 guest

cron
(855) SEEDCODE
[email protected]
Follow us: