Page 1 of 1

Multiple Journal Tables

PostPosted: Fri Dec 19, 2008 1:36 pm
by DillonF
I have FMSpark pulling contact info from a Customers Table and a Leads Table. I linked the journal table into the customers table per the Documentation. But I don't see a way to have have entries go to a different journal table based on if it is a Customer or a Lead.

PostPosted: Fri Dec 19, 2008 2:19 pm
by John Sindelar
Hi Dillon,

Sounds like a nice setup, but I don't think you need a second journal table. Rather, some of your journal entries will have contact IDs in them, and some will have lead IDs. Provided you prefix your IDs with something to keep them separate you're all set.

PostPosted: Fri Dec 19, 2008 2:28 pm
by DillonF
I wanted to have a portal on the leads and customers area that linked back to all of the mailings. Now I just pass in the auto enter serial to Fm Spark for both types. Not sure how I can use the one field of ID to link to the Two different IDS of the Customers or Leads.

PostPosted: Fri Dec 19, 2008 2:34 pm
by John Sindelar
So are Customers and Leads in the same table?

PostPosted: Fri Dec 19, 2008 3:11 pm
by DillonF
No They are separate tables. I can email you my Relationship Graph when I get home if you want to see it.

PostPosted: Fri Dec 19, 2008 3:23 pm
by John Sindelar
No. That's OK, but thanks. I'll look at what is involved in either adding another ID field to the journal table or adding another journal table.

PostPosted: Fri Dec 19, 2008 3:56 pm
by DillonF
Thanks :D

PostPosted: Sat Dec 20, 2008 8:25 am
by John Sindelar
Seems that your request is already anticipated in the scripts fmSpark uses to create the journal entries.

The script "create journal entry" (in fmSpark's "[ MESSAGES ]" section of scripts) contains a branch where you can create records in a second journal table depending on which Merge Group your message is related to.

So, create your new journal table by duplicating the one you're already using for Customers and then duplicate the script "New Action..." in your file, modifying it to create new records in this new journal table.

Now return to fmSpark and edit the "create journal entry" script, finding the comment "----- Duplicate script steps below for new GROUP -----". Edit the ElseIf() line that follows to use the name of your second merge group (the one for leads).

Continue editing this script to call your second version of the "New Action..." script right after the comment "call journal creation script in "YOURFILEHERE" file".

The script's comments are pretty good: better than my explanation above. ;-)