Original author: Sean DeWitt
Date created: January 07, 2005
This is going to be a very important task when working with real client data. It's also something that is not built out at all in METRIX version 1.1.0, and we'll need to address this moving forward. Here are the steps needed to import a custom table into METRIX:
- Import your Contacts, Contact Locations, Interaction Definitions and Interactions, as you normally would. Move these values through the preview area and into the METRIX application.
- Here's the trick. When you import your custom table data, you need to refer to the METRIX-generated ContactID, InteractionID, and InteractionDefinitionID. You cannot refer to the LinkfieldNumber_X values you used in your Excel spreadsheet. Therefore, this step is where you have to replace the LinkfieldNumber_X values with the actual ContactID, InteractionID, and InteractionDefinitionID.
To do this, I go into the tables in METRIX directly after I've imported the values in step 1, and I look at the ContactID that was generated for the first Contact in my imported list. I then move into my Excel sheet and copy this ContactID number over the old LinkfieldNumber_X on the Excel worksheet that holds that custom table data. I then copy incremented ContactID values down the line for all the Contacts, then sanity check them to see if they are correct. I do the same for InteractionID's and InteractionDefinitionID's.
- Now that your Excel sheet with custom table data has the three foreign keys correctly populated, we can move this sheet into your "devmodule.mdb" database. Open devmodule.mdb, and import the data from this sheet into a table you call "tblCustom...".
- You now have a custom table just like your old custom tables that were just the structure only. Difference here, there is data populated! The table will import just the same way, though. Once you've imported the table and have it in devmodule.mdb, open the form "frmSetupModules" and input the information for your custom table.
- Open interactsql.adp, just as you would for other custom tables, and on the startup form, click "Add Modules" to bring the custom table into the database.
- Open metrix.adp, and you can further configure your Interaction Definition if need be. Otherwise, you're good to go, and the Interactions with the corresponding custom table data will already be showing up for your Contacts.
To me, the trick here is how to use code to get the ContactID, InteractionID and InteractionDefinitionID that is generated for the LinkfieldNumber_X values.