It has been a while since I looked "under the hood" at the email campaign solution and it is quite possibly the most advanced solution in the batch. But I can tell you how I do such things in db I write from scratch. I create an archive log table with fields for the document name, person sent to, date sent, etc. Then at the end of the loop from sending the email (or where ever it fits best in the script) I set the relevant data to variables (or reuse them if they have already been set) and go to the log table, create a new record, set the fields and back to the loop. You might want to trap for errors in case the email doesn't go out.
You didn't say if you were going to use FM's internal SMTP to send the emails or a client. If you use a client and there are Applescripts to get the information out of the email client which could be imported into your Log table. Either way you then relate the Log table back to Contacts using the ContactsID and if you put a portal on the contacts layout you can peruse the emails sent to that contact.
HTH, if not keep asking.
Thank you Bumper for reply. I'm using built in smtp mechanism to send email. I tried to add a field or portal but tables are not related to each other and this is the part where I'm stuck. If you or other people could take a look would be great.
thanks a lot Ricardo
I tried to add a field or portal but tables are not related to each other
You'll need to spell that out in a lot more detail. Identify the layout where you tried to do this and where you wanted to add the fiedl--both on the layout and in what table. Someone can then open up a copy of the starter solution and check what you tried to do against manage | Database | relationships to both figure out why it didn't work for you and also what to do so that you can get it to work.
Thanks PhilModJunk for you reply.
I tried the best I hope this will be useful. In picture below I'm looking to place portal/field which will contain the latest used name of email campaign where this record has been involved. If the field will be empty this would obviously mean that no mail has been sent to this record. Even field mail sent will be helpful.
When I tried to place field myself I've noticed there is no relationship between both tables. In the 2nd picture below you can see that contacts are in Contacts table (A) and information about sent emails is kept in Campaigns>Campaigns_History>Recipient list (B) I'm looking for help to have some info from table B displayed in layout from table A.
If you could take a look please. Would be great.
You can create as many table occurrence boxes in Manage | Database | relationships for the same data source table as you need to get the results that you need.
Since your layout is based on Contacts, you'll need to modify the lower group of relationships by adding new table occurrences for campaign_contacts, campaigns and campaign_History to get the relationship you'll need:
Contacts::ContactID = ContactsCampaign_Contacts::ContactID
ContactsCampaign::CampaignID = ContactsCampaign_Contacts::CampaignID
ContactsCampaign_History::CampaignID = ContactsCampaign::CampaignID
would allow you to place a portal to ContactsCampaign_Contacts on your layout and you can then place as many fields as you need to add detail from the ContactsCampaign and ContactsCampaign_History table occurrences.
Since Table Occurrence may be a new concept, you may want to read this tutorial before you try the above changes:
Thank you for explanation, I tried follow you diagram and for me is not clear which are new table occurrences and which are existing one. Could you point me in good direction please.
Thank you and sorry for multiple questions. All this is a result of placing a Photoshop guy in front of Filemaker :-)