I'm trying to find the best way of printing a list of CONTACTS info which would include the related records of ADDRESSES and NUMBERS.
I'm trying to stay away from printing portals, for all the obvious reasons, which seems to leave me with the option of exporting all the info from the 3 tables to a temporary table.
However, the script for accomplishing that seems like a nightmare -- whichever way I slice it.
Not to mention the layout issues on the printing table.
Does anyone have any experince dealing with this?
Thanks,
Michael Reade
Printing from Multiple Tables
8 posts
• Page 1 of 1
Posts: 11
Joined: Sun Nov 07, 2004 11:20 am |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Well if you only had one related table (say addresses) it would be easy, right... you'd print from the related table, putting the contact information in a summary part.
Two related tables makes this tricky as you've found. Aside from printing one portals, I'd take the simplest of the two related pieces (probably the phone numbers) and pull all the related phone number information for a given contact into a text field in the contact's record. (You'd use this text field just for printing). Then you can print from Addresses as usual. You can build this text field using the Troi text plugin or with a creative use of the ValueListItems function. Be sure to trap for instances where a contact has no record in addresses and make one anyway. Hope that helps. John Sindelar
SeedCode |
Posts: 11
Joined: Sun Nov 07, 2004 11:20 am |
John,
Thanks for your reply. There is an issue about whether there might be more addresses than numbers for a contact, or the other way around. On my way to work I thought of the following strategy (thank the always inspiring NY subways for that) First of all, it would have to be a report rather than a link. Second, it would happen in a temporary file (in my case, I'll use a LABELS table). Here's what it would look like in pseudo code:
There are a couple of additional steps to pretify the whole thing. Any thoughts? Michael Reade Saci Solutions |
Posts: 46
Joined: Thu Aug 19, 2004 6:33 pm Location: Minneapolis, MN |
I like John's suggestion better. No deletion or looping required, and it's safer for multi-user environments.
|
Posts: 11
Joined: Sun Nov 07, 2004 11:20 am |
OK, I'll try to give John's idea a shot... I'll keep you posted
Michael |
Posts: 11
Joined: Sun Nov 07, 2004 11:20 am |
Just to expand on John's idea... As I see it, one must loop through the CONTACTS table to pull all the related numbers and dump that info in a text field.
Then we must somehow go to all the related ADDRESSES of the found set of CONTACTS and print them (via a multi-lined text global field??? related to a text field identical to the number field???). Ender, I'm not sure whether it's better in a multi-user enviroment, because in my scenario we are not creating or modifying any record on the 3 tables in question -- only records in the TEMP table. The big problem with mine, as I see it, is that it is VERY CPU intensive. Michael |
Posts: 46
Joined: Thu Aug 19, 2004 6:33 pm Location: Minneapolis, MN |
|
Posts: 11
Joined: Sun Nov 07, 2004 11:20 am |
Very cool.
I was playing with your file a bit. There is definetely a simplicity that my way was lacking. You could also do both of these valuelist item calcs on the Contacts db, and avoid any danger on not having a related address. This way you can also avoid the subsumary layout part. The only thing i'm grappling with now is how to have more control over the field formating. Question: is there a tab special character one might use? Thanks a lot for your help Ender. You too John. All the best, Michael Reade Saci Solutions |
8 posts
• Page 1 of 1
Return to FileMaker Products (General)
Who is online
Users browsing this forum: No registered users and 3 guests