A History of your Mailings: Journaling
fmSpark allows you to keep track of all the mailings you've sent to an individual contact. You can see an example of this in the SampleContacts file that ships with fmSpark; just click on the Journal tab for a contacts record.
This screen shows a portal to the Journal table in the SampleContacts file. In SampleContacts.fp7 this table is related to the contacts table via the Contact ID and there are routines in fmSpark to create these records for you, making one record in Journal for every mailing 'sent to a contact. You can enable this by marking "Create Journal Entries" on the Defaults tab of the Settings screen in fmSpark (from the fmSpark menu, select "Settings...").
To begin, you'll need a table in your contact's file to hold records of your correspondence. If you don't already have one you can import the Journal table from SampleContacts.fp7 using FileMaker Advanced. Link this to your contact's table via the Contact ID.
Now edit the relationship graph in fmSpark and double click on the "_Contacts LogTable" table occurrence. Copy the name "_Contacts LogTable" and then point this occurrence at the Journal table in your contacts file. Paste the name back in so that the table occurrence is still named "_Contacts LogTable" and line the GroupRecordID field up with the ID field as shown here:
Now you'll need to add a script from SampleContacts.fp7 to your contacts file. Import the script "New Action ( contacID*; type*; "note"* )" into your file. You'll need to go through this script to make sure it lines up with the entities in your file. Specifically, check the following items (the relevant lines are highlighted in blue below):
* Make sure the Go to Layout in line 6 goes to a layout based on your Journal table.
* Check each of the 3 Set Field statements to make sure they're setting your Journal table's Contact ID, Type, and Text fields.
* And make sure the line "Set Variable [ $recordID..." is setting that variable to the "ID" field from your Journal table.
Once that script is in your file and has been cleaned up as described above, open fmSpark.fp7 and edit the script "create journal entry". Twice in this script you'll see references to the script you just edited above, but instead of calling this script in SampleContacts, change these two lines so they call the copy of the "New Action ( contacID..." script in your file. Both instances follow a comment beginning "call journal creation script..." so they are easy to find.